-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow documents starting with <!doctype html> (UnexpectedBang) #230
Comments
Given that that's not valid XML, I would not expect an XML library to parse it. It seems like there still isn't a clear answer for whether this library intends to be an XML parser or something else, though. |
This library does intend to parse valid xmls only by default yes. Html parsing could be supported on a case by case and best effort basis. |
IMO, given that there already exist quite good crates for HTML parsing in Rust (e.g. html5ever), and given that HTML parsing is very different from XML parsing (despite them looking similar), it would simplify things a lot and probably lead to a higher quality library if HTML parsing was explicitly out of scope for quick-xml. |
Currently parsing documents with quick-xml/tests/xmlrs_reader_tests.rs Lines 42 to 50 in 532990d
|
Currently, quick-xml returns UnexpectedBang if a document starts with
<!doctype html>
, which caused this issue: deltachat/deltachat-core-rust#1804. The problem is that quick-xml will refuse to read the rest of the file then.The text was updated successfully, but these errors were encountered: