The XMLSerializer() constructor creates a new XMLSerializer.
new XMLSerializer()None.
A new XMLSerializer object.
This example serializes an entire document into a string containing XML.
const s = new XMLSerializer();
const d = document;
const str = s.serializeToString(d);
saveXML(str);This involves creating a new XMLSerializer object, then passing the Document to be serialized into serializeToString(), which returns the XML equivalent of the document. saveXML() represents a function that would then save the serialized string.