Now it can output nearly valid HTML and XML.
This change BREAKS the output compatibility with version 0.7.0.
What is missing:
  a) Escaping in all formats;
  b) Output HTML structure with body;
  c) Output XML root element;