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