I ran into a problem parsing XML file which isn’t giving me the results I expect.
high level steps of flow service are as following:
read file using
convert xml string to XmlNode
Get iterator against XmlNode (where its criteria is assigned value “Customer”)
invoke getNextXmlNode inside REPEAT flow step
following is the output of this step in debug view:
Invoke xmlNodeToDocument
following is the output of this step in debug view:
Invoke documentToXMLString
following is the output of this step in debug view:
Create new string in a MAP flow set as following:
“<Customer>” + value of xmldata + “</Customer>”
write value of newly created string (in above step) to a file on local disk using:
Now actual content (xml) written to file (in above step) is as following:
Now problem is that the xml data written to local disk file is not reflecting attribute “CustomerID” correctly in xml as highlighted in below screenshot:
I wanted to seek help from respected community members in this regard. Can some one please guide me how I can have the CustomerID attribute written correctly in output file instead of the way it is currently being written (highlighted in yellow color in above screenshot)
Thanks
For your reference following is the actual source xml data sample:
Thanks @Mohankumar_N !!
but if I change my criteria in the Iterator, then should have to create another DocumentType for another entity.
means I have to put everytime… like its a solution for one entity only
I got you !!!
but it only creates a named document according to the (given) criteria, what about the different variable/names of the entity that lie under the document?
for your understanding, two different nodes :
All the child elements inside the Customer document or Order document will be taken. Have you tried this solution on your server with your source file?