Given a Node instance assumed to be the root of a DOM or Domlette
tree, this function serializes the document to the given stream or
stdout, using the given encoding (UTF-8 is the default). Extra
whitespace is added to the output for visual formatting. The asHtml
flag can be used to force HTML-style serialization of an XML DOM.
Otherwise, the DOM type (HTML or XML) is automatically determined.
This function does nothing if root is not a Node.
It is preferable that users import this from Ft.Xml.Domlette
rather than directly from Ft.Xml.Lib.Print.