tango.text.xml.DocPrinter

License:

BSD style: see license.txt

Version:

Initial release: March 2008

Authors:

Kris
class DocPrinter(T)
Simple Document printer, with support for serialization caching where the latter avoids having to generate unchanged sub-trees
alias Document!(T) Doc
the typed document
alias Doc.Node Node
generic document node
DocPrinter indent(uint indentation) [final]
Sets the number of spaces used when increasing indentation levels. Use a value of zero to disable explicit formatting
DocPrinter cache(bool yes) [final]
Enable or disable use of cached document snippets. These represent document branches that remain unaltered, and can be emitted verbatim instead of traversing the tree
T[] print(Doc doc, T[] content = null) [final]
Generate a text representation of the document tree
void print(Doc doc, OutputStream stream) [final]
Generate a text representation of the document tree
void print(Node root, scope void delegate(const(T)[][]...) emit) [final]
Generate a representation of the given node-subtree