Okay, hopefully I didn't miss a thread that is making this a duplicate. Everything I found was about AJAX requests with jQuery, whereas I'm not working with AJAX, and I'm using native JS.
Basically, I'm creating a DOM parser, and then an XML document from that.
var parser = new DOMParser();
var doc = parser.parseFromString(HTML, "text/xml");
Once I do my manipulation, I need to XML as a string, not an object.
In Chrome, I can just do doc.innerHTML
, but IE doesn't even have an innerHTML
attribute, which makes sense since it is XML and not HTML.
I know I can create a new node, and copy all children over to that, then get the innerHTML, but is there a better / faster way than that to just get the string representation of an XML document?
Thanks.