[squeak-dev] getting the XMLHTMLParser to stop fixing things
gettimothy at zoho.com
Fri Nov 26 13:52:12 UTC 2021
I was hoping I could use Mont's XMLHTMLParser to detect errors for me in my PEG parsing. Unfortunately, it fixes stuff!
Here, I have a missing </body> on the input stream
ios := ReadStream on: '<html>
document := XMLHTMLParser parse: ios.
and the document shows it as fixed.
What I would like is for it to throw an error when content shows up outside any tags within the body tag.
For example this should pass:
this should not
should throw an error
Now, the XMLDOMParser throws a XMLWellFormednessException on any html, which I could use IF I can figure out how to get the XMLDOMParser to only barf on broken xHTML and display valid xHTML.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev