cancel
Showing results for 
Search instead for 
Did you mean: 

Issue on reading multi-level nested XML document

ppankaj88
New Contributor

Hello Everyone,

I have a requirement to read very complex xml document and make it in structure format.

And also xml files and information are keep changing. I have attached the file here.

It would be good if I anyone would help me with a python code which can get executed in SnapLogic itself

thankstext.txt (2.7 KB)

3 REPLIES 3

christwr
Contributor III

In general, XML data should comply with some defined schema/dtd.

If you’re going “weird” XML to “cleaner” XML, then you should be able to use the XML Parser, with a Mapper, and then a XML Formatter. Or, you could maybe just use a XSLT to transform the XML in just one step, or at least clean it up before processing it further.

Hi,

Is it possible to share sample code which I can use while parsing.

Thanks,
Pankaj

Hi Pankaj,

The file that you attached was simply an invalid xml, it was missing a closing tag for node TravelITerinary once I corrected the file and you should be able to parse it using the XML parser

image

Thanks,
EmEm