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.

Please Help.