XML.encode()
Description
Writes document into text.
This method returns a Data for the formatted text. When a string is needed, use XML.stringify() instead, which could be a bit lower in performance.
Syntax
XML.encode(node)
Parameters
encode(rootNode, space?)
rootNodespace?
A XML.Node object representing the root document node.
Number of spaces for indentation while formatting.
Return Value
A string containing the text of the XML document after formatting.