Pretty-print a DOM node with the given indent (default two spaces).
Like Python's toprettyxml, keep a sole text child beside its tags, even
when it contains only whitespace. Keep mixed content intact too: adding
indentation there would change its text. xml:space="preserve" and text-
bearing local names also keep the entire element verbatim. Only element-
only content is re-indented; serialized text and opaque markup are copied.
Pretty-print a DOM node with the given indent (default two spaces). Like Python's
toprettyxml, keep a sole text child beside its tags, even when it contains only whitespace. Keep mixed content intact too: adding indentation there would change its text. xml:space="preserve" and text- bearing local names also keep the entire element verbatim. Only element- only content is re-indented; serialized text and opaque markup are copied.