XML mode

x
 
1
<html style="color: green">
2
  <!-- this is a comment -->
3
  <head>
4
    <title>HTML Example</title>
5
  </head>
6
  <body>
7
    The indentation tries to be <em>somewhat &quot;do what
8
    I mean&quot;</em>... but might not match your style.
9
  </body>
10
</html>
11

The XML mode supports two configuration parameters:

htmlMode (boolean)
This switches the mode to parse HTML instead of XML. This means attributes do not have to be quoted, and some elements (such as br) do not require a closing tag.
alignCDATA (boolean)
Setting this to true will force the opening tag of CDATA blocks to not be indented.

MIME types defined: application/xml, text/html.