scsvel
15 years agoFrequent Contributor
Not able to instantiate DOMParser class
Hi all,
I am creating XML doc via code using XMLWriter class which forms my final XML doc as a string. So finally I want to convert str to actual XML. I tried to use DOMParser as
var domParser = new DOMParser();
var actualXml = domParser.parseFromString(xmlStr, "text/xml");
return actualXml;
But I got error in first line itself. It says like DOMParser undefined. Its not creating instance for DOMParser class as it not identified.
Kindly help me to solve this problem..
I am creating XML doc via code using XMLWriter class which forms my final XML doc as a string. So finally I want to convert str to actual XML. I tried to use DOMParser as
var domParser = new DOMParser();
var actualXml = domParser.parseFromString(xmlStr, "text/xml");
return actualXml;
But I got error in first line itself. It says like DOMParser undefined. Its not creating instance for DOMParser class as it not identified.
Kindly help me to solve this problem..