Dispalay xml in mozilla
I need to feed xml content to a function.
I did the following code,
// initialized xmlDoc by identifying browser
It works fine in IE but not in mozilla.
alert(xmlDoc.documentElement) returns an Object Element
but alert(xmlDoc.documentElement.xml) returns null
Is there any similar functionalities that work in mozilla.
This article gives some suggestions on loading xml in Mozilla. Mozilla and IE have very different functions for manipulating XML, so you'd have to look up all the individual functions. At the W3C Schools Website they have another example of how to do this in a cross-browser way.
I got the solution myself from some other site.
I think this might be useful.
// initialize xmlDoc by identifying browser
var s = new XMLSerializer();
var str = s.serializeToString(xmlDoc);