Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to convert a string to XML using the javascipt model of Apigee

Not applicable

I am converting an XML to JSON using Javascript. The XML comes in as a string and I am not able to convert it into an XML object. Can anyone guide me in this regard.

As of now I have tried

var parser=new DOMParser();

xmlDoc=parser.parseFromString(xml,"text/xml");

It throws an error indicating DOMParser is undefined. The above code is only for browsers, can you help in the execution of Apigee envt?

0 7 3,765
7 REPLIES 7
Top Solution Authors