Closed LilyBergonzat closed 5 years ago
Hello! I try to explain why you have to set it in the README:
You can allow the > character within XML comments and CDATA sections if you want. This is pretty uncommon, and therefore turned off by default for performance reasons.
So it's purely to speed things up. The parsers aren't very clever, they're just supporting the least minimum effort to parse most XML documents which works for most use cases. Its CDATA logic is pretty dumb and there are probably edge cases not supported at all.
If you're looking around for incremential xml parsers you might want to check out this thing I've found as well: https://github.com/TBPixel/xml-streamer
Haven't tried it but looks a bit more modern than mine. Good luck!
I'm trying to load a simple XML code that has HTML in one of its tags. My code is pretty straightforward.
And I end up getting a warning:
Premature end of data in tag attr line 2
This is because the walker parses the HTML that is inside the CDATA tags, and considers the "node" is finished before adding the
</attr>
tag. If I set "expectGT" to true, it works correctly, but I feel like I shouldn't have to do that since the HTML code is inside CDATA tags and shouldn't be parsed.What do you think? Thank you