xml-rs
xml-rs copied to clipboard
xml-rs should fail parsing files that lead in with comments (<!-- -->)
Apparently comments may not appear before the <?xml? ...
, but I have an example where xml-rs is happy to accept such input.
See here, for example: https://stackoverflow.com/questions/1196467/ok-to-put-comments-before-the-xml-declaration
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...)
Fixed