I have an XML file which was generated by serialising a C# object.
I want to parse this XML using javascript.
When i try to load a string as XML using javascript, it works fine in IE 8, but fails in Firefox.
This is the code i am using
if (window.DOMParser)
{
parser = new DOMParser();
xmlDoc = parser.parseFromString(stringValue, 'text/xml');
}
else
{
xmlDoc = new ActiveXObject('Microsoft.XMLDOM');
xmlDoc.async = 'false';
xmlDoc.loadXML(stringValue);");
}
Any idea why? i thought I had taken care of browser incompatiblity in the above code. Also, here is the XML file, if it can be of any help.