Closed LordOfDragons closed 4 years ago
Hmm, investigating - this is the #1 issue with users of Mini-XML trying to load documents that are not well-formed...
Well, according to xml standard no character is allowed to show up before <?xml or a well-formed node. I think using the check " is '<?xml' or '<'" instead of "is '<?xml' " should help both cases
OK, I'll pull the requirement for <?xml
at the start but not <
(i.e. the first character needs to be <
).
[master e2f7978] Roll back part of the change for Issue #256 since it causes a regression for some applications and the XML 1.0 specification only requires an XML file to start with '<' (Issue #259)
This commit today broke our application. The standard states that the <?xml is optional in xml version 1.0 . So far we used a check if the returned element is the xml declaration (with the actual xml node as child) or the actual xml node itself.
Because this commit contradicts the XML standard I would kindly request to revert the commit or to make this behaviour configurable (and disabled by default).
Reference: https://www.w3.org/TR/xml/#sec-prolog-dtd