CodeMirror: XML mode
This is my XML parser, based on the original:
- No html mode - this is pure xml
- Illegal attributes and element names are errors
- Attributes must have a value
- XML declaration supported (e.g.: <?xml version="1.0" encoding="utf-8" standalone="no" ?>)
- CDATA and comment blocks are not indented (except for their start-tag)
- Better handling of errors per line with the state object - provides good infrastructure for extending it
What's missing:
- Make sure only a single root element exists at the document level
- Multi-line attributes should NOT indent
- Start tags are not painted red when they have no matching end tags (is this really wrong?)
MIME types defined: application/xml
, text/xml
.
@author: Dror BG (deebug.dev[at]gmail.com)
@date: August, 2011
@github: https://github.com/deebugger/CodeMirror2
MIME types defined: application/xml
, text/xml
.