Færdiggjort

XML parser - file re-arranger

I need someone that can create a bash or shell script ideally (but could be python it seems) that reads the contents of a file which contains pipe seperated values and the order that the xml tag pairs need to appear in the second file. I have attached example files in full to give a better idea.

The second file needs to have the tags re-arranged in order based on the order of the values in the first file.

Step 1 read the FIRST file to capture the order of the tags seperated by pipes.

Step 2 - Identify the tag name based on the number in the first file and match it to the 'name' in the second file in the <fields> section. Eg 35=MessageType. The tag name lookup is under fields in the second file. -<fields>

Step 3 - Change the order of file 2 in section <messages> for each msgtype within the 'Messages' xml section based on the order they appear in the first file.

**1 -Some tags are excluded from the sorting list** These are any header tags.

***2 -Some tags in the first file may NOT exist in the second file to be looked up. These need to be created under 'Fields' in the first file as name="UNKNOWN" and type="STRING". Eg:

<field name="UNKNOWN" type="STRING" number="205879"/>

FIRST FILE EXAMPLE:

019-10-07 11:25:16,416 2070 QuoteRequest (8=FIX.4.2|9=153|35=R|56=NotRel|142=111|50=Stuff|49=OtherStuff|52=20191007-11:25:16.409|34=1|146=1|55=blah|22=4|48=blah|38=123|54=1|207=ABC|131=id|205879=21|10=076|)

SECOND FILE EXAMPLE:

<message name="QuoteRequest" msgcat="app" msgtype="R">

<field required="Y" name="QuoteReqID"/>

<group required="Y" name="NoRelatedSym">

<field required="Y" name="Symbol"/>

<field required="Y" name="IDSource"/>

<field required="Y" name="SecurityID"/>

<field required="Y" name="OrderQty"/>

<field required="Y" name="Side"/>

<field required="N" name="SecurityExchange"/>

<field required="N" name="TransactTime"/>

<field required="Y" name="Currency"/>

</group>

</message>

<field name="QuoteReqID" type="STRING" number="131"/>

<field name="BidPx" type="PRICE" number="132"/>

<field name="OfferPx" type="PRICE" number="133"/>

<field name="BidSize" type="QTY" number="134"/>

<field name="OfferSize" type="QTY" number="135"/>

-<field name="ResetSeqNumFlag" type="BOOLEAN" number="141">

<value description="YES_RESET_SEQUENCE_NUMBERS" enum="Y"/>

<value description="NO" enum="N"/>

</field>

-<header> <----------- THIS IS NORMALLY AT the Start of the file. These tags should be excluded from the SORT.

<field required="Y" name="BeginString"/>

<field required="Y" name="BodyLength"/>

<field required="Y" name="MsgType"/>

<field required="Y" name="SenderCompID"/>

<field required="Y" name="TargetCompID"/>

<field required="N" name="OnBehalfOfCompID"/>

<field required="N" name="DeliverToCompID"/>

<field required="N" name="SecureDataLen"/>

<field required="N" name="SecureData"/>

<field required="Y" name="MsgSeqNum"/>

<field required="N" name="SenderSubID"/>

<field required="N" name="SenderLocationID"/>

<field required="N" name="TargetSubID"/>

<field required="N" name="TargetLocationID"/>

<field required="N" name="OnBehalfOfSubID"/>

<field required="N" name="OnBehalfOfLocationID"/>

<field required="N" name="DeliverToSubID"/>

<field required="N" name="DeliverToLocationID"/>

<field required="N" name="PossDupFlag"/>

<field required="N" name="PossResend"/>

<field required="Y" name="SendingTime"/>

<field required="N" name="OrigSendingTime"/>

<field required="N" name="XmlDataLen"/>

<field required="N" name="XmlData"/>

<field required="N" name="MessageEncoding"/>

<field required="N" name="LastMsgSeqNumProcessed"/>

<field required="N" name="OnBehalfOfSendingTime"/>

</header>

-<trailer>

<field required="N" name="SignatureLength"/>

<field required="N" name="Signature"/>

<field required="Y" name="CheckSum"/>

</trailer>

Evner: XML, Shell Script

Se mere: vbnet xml record file, xsl xml flat file, vbnet create sql xml insert file, php project xml parser, xml parser mysql database, xml parser creator, weather xml parser, xml flat file, drupal xml parser, user agent php xml parser, editing xml saving file flash, simple xml save file php, weathercom xml parser, xml crypted file, xml parser flex file

Om arbejdsgiveren:
( 43 bedømmelser ) London, United Kingdom

Projekt ID: #21660294

Tildelt til:

polarjin2017

Hello? How are you? I am excited to work with you on this project. I have good skills in those. So I think I can help you if you want. So i hope to discuss your project vis chat deeply. Thanks. Best regards.

£150 GBP in 3 dage
(4 bedømmelser)
3.7

11 freelancere byder i gennemsnit £157 på dette job

sashaE319WebGuru

Hello. How are you? I have just read your post and interested in this job. As an experienced web developer, I am sure I can handle your project perfectly in the quick timeline. I have considerable expertise in backend Flere

£135 GBP in 7 dage
(15 bedømmelser)
6.3
bouslimi1979

Hi, it have not really to be python... I can code an Excel/VBA app to generate the file. It will be very easy to use. But need few clarifications if possible. Thanks

£140 GBP in 3 dage
(4 bedømmelser)
3.1
lkhelladi

Hello, I'd be glad to develop a python script that performs XML parsing and processing for your files. Looking forward to chat with you soon for more details. Best regards,

£135 GBP in 2 dage
(2 bedømmelser)
3.0
RushService

Feel fee to contact me for XML parser - file re-arranger .Shoot me message to discuss further more details .We provide the comments,images,videos,demos and live sessions in order to help the [login to view URL] payment o Flere

£150 GBP in 3 dage
(1 bedømmelse)
2.1
phantom1222

★ Hi, Thanks for your attention. I am proud of my top skills, 8+ years of experience, 100% satisfaction rate in web development. I am well versed in XML and its Phrasing. Based on your feedback, I can draft my pr Flere

£150 GBP in 7 dage
(1 bedømmelse)
3.0
luiswilliam

Hi I can make the XML parse quickly, maybe few hours, not a day, I can start now. Please send me a chat now. Regards

£150 GBP på 1 dag
(1 bedømmelse)
0.7
kozachenkodr

Hello. I have checked txt and xml carefully, well confident in your job. I suggest Python script, so txt will be converted into XML automatically. Please ping me to discuss more. Regards.

£135 GBP in 7 dage
(0 bedømmelser)
0.0
romancoder204

Hi, thanks for posting. I think I can use the Java language. It is better than the others. Recently, I completed project like yours. You can see my recent review. Please contact me. Thanks, Roman.

£150 GBP in 3 dage
(0 bedømmelser)
0.0
undeeadwork

Dear sir. I have read your description carefully and I can see you are looking for a regexp professional developer. So I can say that is what I specialized in. Well, I have more than 7 years of experience in website ap Flere

£300 GBP in 5 dage
(0 bedømmelser)
0.0
topexpert713

Hi, Nice to meet you! I have read your requirements carefully and I am very interesting for your project. I am confident of this project as I'm a professional Python expert with over 5 years of experience. It seems to Flere

£135 GBP in 7 dage
(0 bedømmelser)
1.6