-
Notifications
You must be signed in to change notification settings - Fork 8
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
What about html(5?) support? #28
Comments
HTML is not XML. I don't think this is a reasonable feature request. For further information about the madness that HTML supports, check out the spec here: https://www.w3.org/TR/html5/syntax.html#tree-construction. Note the gigantic state machine specified for parsing malformed tags. |
Of course if your HTML input also happens to be XHTML, then there shouldn't be a problem. |
I know it's not the same. But maybe at least XHTML 5 could be interesting. |
(anyway: I don't care too much about parsing malformed html and fixing it. It would be interesting to have dom-related function for tree manipulation and output valid html5) |
On Mon, Aug 1, 2016 at 10:21 AM, Andrea Fontana [email protected]
|
@trikko as @Hackerpilot said, it's not possible to parse all HTML with an XML parser. The idea is to keep the components of the library as independent and generic as possible. So, for example, the parser and cursor do not check for correct element nesting. The parser doesn't even need to parse attributes. So this library already provides some building blocks to parse HTML. |
This issue was moved to dlang-community/experimental.xml#10 |
I wonder if it is too difficult to support also html 5. IMO it would be a good idea for web-related applications.
The text was updated successfully, but these errors were encountered: