Convert CSV with complex format to XML

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Convert CSV with complex format to XML

bsri81@gmail.com
This post has NOT been accepted by the mailing list yet.
Hi,

I have csv file as below, I need to convert that csv file to XML format.

$Header
ITEM
ITEM_COL1,ITEM_COL2
ITEM_REF
ITEM_REF_COL1,ITEM_REF_COL2
$Body
ITEM
COL1,COL2
ITEM_REF
REF_ROW1COL1,REF_ROW1COL2
REF_ROW2COL1,REF_ROW2COL2

Basically $headers has main header and subheader names
$body has main header with values under it.

Can you please suggest How to achieve this.

Regards,
Sri
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Convert CSV with complex format to XML

vishnu.piskala

Hi

 

You have to use custom encoders. This link can help: http://www.logicoy.com/wikilogicoy/Wiki.jsp@page=CustomDefined.html

 

Regards

Vishnu

www.logicoy.com

 

 

 

From: [hidden email] [via OpenESB Community Forum] [mailto:[hidden email]]
Sent: Tuesday, February 28, 2017 3:43 PM
To: vishnu.piskala <[hidden email]>
Subject: Convert CSV with complex format to XML

 

Hi,

I have csv file as below, I need to convert that csv file to XML format.

$Header
ITEM
ITEM_COL1,ITEM_COL2
ITEM_REF
ITEM_REF_COL1,ITEM_REF_COL2
$Body
ITEM
COL1,COL2
ITEM_REF
REF_ROW1COL1,REF_ROW1COL2
REF_ROW2COL1,REF_ROW2COL2

Basically $headers has main header and subheader names
$body has main header with values under it.

Can you please suggest How to achieve this.

Regards,
Sri


If you reply to this email, your message will be added to the discussion below:

http://openesb-community-forum.794670.n2.nabble.com/Convert-CSV-with-complex-format-to-XML-tp7581533.html

To start a new topic under OpenESB Community Forum, email [hidden email]
To unsubscribe from OpenESB Community Forum, click here.
NAML

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert CSV with complex format to XML

Paul Perez
Administrator
In reply to this post by bsri81@gmail.com
Hello Sri

You could have a look on the document found in OpenESB documentation page named Import legacy data with Open-ESB: CSV file

Enjoy

Paul
www.pymma.com The best services on OpenESB
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Convert CSV with complex format to XML

bsri81@gmail.com
This post has NOT been accepted by the mailing list yet.
In reply to this post by vishnu.piskala
Hi,

Thanks for reference.

I have CSV file as below:
Header
SHIPMENT
Step1,Step2,
Party
PartyName,PartyID,
Contact
PartyFname,PartyLname,
Party2
PartyName2,PartyID2,
Contact2
PartyFname2,PartyLname2,


Output XML Should be as below:
<Header>
</SHIPMENT>
<Party>
         </PartyName>
         </ID>
         <Contact>
            </FName>
            </LName>
         </Contact>
</Party>
<Party2>
         </PartyName>
         </ID>
         <Contact>
            </FName>
            </LName>
         </Contact>
</Party2>



For above conversion from CSV to XML,
What should be the NodeType and Delimiter List Setup.

Can you please suggest.

Regards,
Sri
Loading...