Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

File Content Conversion in Receiver File Adapter

$
0
0

Hi Experts,

 

I got a requirement like "I have to read the below XML and convert into text file with '|' seperator".

 

Below is the XML structure.<Header> is 1..1 cardinality and <Item> is 0..n cardinality and <Response> is 0..1 cardinality.

 

<?xml version="1.0" encoding="UTF-8" ?>

<ns1:Response xmlns:ns1="urn:test.com"> 

<Header>

<Header1>abc</Header1>

<Header2>def</Header2>

<Header3>ghi</Header3>

<Item>

<Item1>Item1Val1</Item1>

<Item2>Item1Val2</Item2>

</Item>

<Item>

<Item1>Item2Val1</Item1>

<Item2>Item2Val2</Item2>

</Item>

</Header>

<Response>

<Message>Some Values are Missing</Message>

<Status>E</Status>

</Response>

</ns1:Response>

 

 

I want to generate the file in the way that for every item one row should be generated and in every row the header(1..1) should get repeated.

And I don't want the response node in the file. I want to ignore it.The file structure should look like below:

 

 

abc | def | ghi | Item1Val1 | Item1Val2 |

abc | def | ghi | Item2Val1 | Item2Val2 |

 

 

Please let me know how the header should be repeated in every row. I need this very urgent.

 

Your help will be greatly appreciated.

 

Thanks,

Swapnika


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>