Processing Extra Whitespace

By default, JADE assumes that an XML document contains data and automatically discards extra whitespace between adjacent tags. This optimization significantly improves performance by avoiding the need to create extra text objects.

When writing the document, the document tree is written with automatic indentation by default. If the extra whitespace is significant, you can set the JadeXMLDocument::keepWhitespace parameter to true to instruct the parser to keep the extra whitespace as text nodes.

When writing the document, you can set the JadeXMLDocument::indentString property to the empty string, to write the document without automatic indentation.