You can do this by serializing just the root node:
new XMLSerializer().serializeToString(xmlObject.documentElement);
Demo: http://jsfiddle.net/timdown/LmWkL/
You can do this by serializing just the root node:
new XMLSerializer().serializeToString(xmlObject.documentElement);
Demo: http://jsfiddle.net/timdown/LmWkL/