I want to convert XMLDocument object that I\'m getting as a response from an ajax request, to a string. I tried using
new XMLSerializer()).serializeToString
You can do this by serializing just the root node:
new XMLSerializer().serializeToString(xmlObject.documentElement);
Demo: http://jsfiddle.net/timdown/LmWkL/