Remember: Writing correct enough parsers is not hard. It’s just very, very annoying. And whatever you make will probably be slightly wrong, in ways you both can foresee and can’t, and you don’t know what sort of fun, fun things spooky hackers will do with that.
In other news, I have not learned my lesson and want to try writing an HTML parser with a delegate pattern again.