Parsing and serializing XML - MozillaZine Knowledge Base
"Mozilla doesn't support (https://bugzilla.mozilla.org/show_bug.cgi?id=155749) the W3C's Document Object Model Load and Save (http://www.w3.org/TR/DOM-Level-3-LS/load-save.html) at this moment, so the easiest way to serialize and deserialize DOM trees is