Skip to Content

Reference for converting XML to JSON in XSJS

Aug 17, 2017 at 03:43 PM


avatar image


I have a SOAP/XML message as output from an external SOAP web service, which I need to convert into JSON in XSJS. This XML message has name spaces. All the examples I see are very basic XMLs.

Could someone share some examples? or any suggestions?



10 |10000 characters needed characters left characters exceeded

Thank you, Sergio. I could get the elements with namespaces. I followed an approach to get the values by using indexOf to get the actual column names.



* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Sergio Guerrero Aug 18, 2017 at 11:25 PM

Mr. Giri,

the XS engine (Classic version) has a library for XML parsing. See is this helps your scenario$.util.SAXParser.html

if you are working on the XS advanced scenario, there may be an npm module that handles XML parsing (with namespaces, etc)

maybe you can show a little bit of your xml payload.. there may be other options that some one else in the community has dealt with it.

10 |10000 characters needed characters left characters exceeded