<!doctype html><html><head><metacharset="utf-8"><title>CodeMirror: XML mode</title><linkrel="stylesheet"href="../../lib/codemirror.css"><scriptsrc="../../lib/codemirror.js"></script><scriptsrc="xml.js"></script><styletype="text/css">.CodeMirror{border-top:1pxsolidblack;border-bottom:1pxsolidblack;}</style><linkrel="stylesheet"href="../../doc/docs.css"></head><body><h1>CodeMirror: XML mode</h1><form><textareaid="code"name="code"><html style="color: green"><!-- this is a comment --><head><title>HTML Example</title></head><body> The indentation tries to be <em>somewhat &quot;do what
I mean&quot;</em>... but might not match your style.
</body></html></textarea></form><script>vareditor=CodeMirror.fromTextArea(document.getElementById("code"),{mode:{name:"xml",alignCDATA:true},lineNumbers:true});</script><p>The XML mode supports two configuration parameters:</p><dl><dt><code>htmlMode (boolean)</code></dt><dd>This switches the mode to parse HTML instead of XML. This
means attributes do not have to be quoted, and some elements
(such as <code>br</code>) do not require a closing tag.</dd><dt><code>alignCDATA (boolean)</code></dt><dd>Setting this to true will force the opening tag of CDATA
blocks to not be indented.</dd></dl><p><strong>MIME types defined:</strong><code>application/xml</code>, <code>text/html</code>.</p></body></html>