jindw / xmldom

A PURE JS W3C Standard based(XML DOM Level2 CORE) DOMParser and XMLSerializer.
Other
816 stars 265 forks source link

Don't treat XML declarations as Processing Instructions #209

Open Holzhaus opened 7 years ago

Holzhaus commented 7 years ago

XML declarations are not processing instructions. This fixes #174.

According to XML 1.0 (5th Edition), Section 2.6, the PI target names "xml", "XML" and so on are reserved.

Production Rule 17 states:

PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))

CodyReichert commented 6 years ago

Just hit this myself.

Anything I can do to help get this one merged? The test cases look correct, but let me know if I can help get it ready for release.