โ02-07-2019 08:27 AM
Hi,
I want to convert JSON to XML and iโm using XML Generator with valid XSD.
I got the output XML after running the pipeline for a fixed known JSON format with fixed XSD.
If the JSON data is dynamic, Now I donโt know the JSON data format because it is a third party data getting from some REST GET snap request. I cannot define exact XSD in XML Generator snap.
Is there a way where the XML Generator generates XML from the dynamic JSON without depending on XSD?
Thanks,
Kiran
โ02-07-2019 02:24 PM
If what you are trying to do is generate XML output from JSON Input, you can just use the XML Formatter, rather than the XML Generator.
โ02-07-2019 08:42 PM
Thank you. As you suggested I replaced the snap XML Generator with XML Formatter in the pipeline as shown below, but Iโm not getting any XML output at XMLFormatter except some meta data like content-type etcโฆ but I see JSON data at JSONParser.
REST GET โ JSON Formatter โ JSON Parser โ XML Formatter
โ02-07-2019 09:23 PM
If you donโt need a wrapping root element (which also includes a metadata element), leave the โRoot elementโ property value empty and if your input JSON is compatible, the appropriate XML will be generated.
โ02-08-2019 05:45 AM