xml-rs icon indicating copy to clipboard operation
xml-rs copied to clipboard

xml-rs should fail parsing files that lead in with comments (<!-- -->)

Open filmil opened this issue 4 years ago • 2 comments

Apparently comments may not appear before the <?xml? ..., but I have an example where xml-rs is happy to accept such input.

filmil avatar May 15 '20 19:05 filmil

See here, for example: https://stackoverflow.com/questions/1196467/ok-to-put-comments-before-the-xml-declaration

filmil avatar May 15 '20 19:05 filmil

Note that you can configure the parser to not ignore the comments and then fail yourself; but since this is not up to spec, perhaps should be automatic.

(And I suppose, next I learn that there are thousands of pieces of banking software or some such that ignores this...)

filmil avatar May 15 '20 21:05 filmil

Fixed

kornelski avatar May 10 '23 23:05 kornelski