The one I'm currently working on is "manual" C++, but I see no reason not to use an parser-generator. Question: Can a parser-generator ensure the output (no matter the input) is valid XML? Can it remove potential harmful HTML tags?
Looks like you mis-understood what a parser generator does.
Based on a formal grammar, parser generator (like yacc or bison) generates parser for this grammar. It does nothing else. It's up to you to write code/actions for grammar parts (in this outputting XML text).
So the answer is: no.
Krzysztof Kowalczyk | http://blog.kowalczyk.info