PDA

View Full Version : SAX2 error recovery



OriginalCopy
12th March 2008, 22:15
I can't find a way of doing error recovering with QXmlDefaultHandler, is there any?

Or otherwise, how would you try to fix malformed xml data?

If possible, please provide a PoC or at least concrete steps (methods which I need to overload, classes I have to use) and in which order they should be called.

Thanks.

jpn
18th March 2008, 14:01
QXmlDefaultHandler implements QXmlErrorHandler interface. See virtual methods QXmlErrorHandler::error() and QXmlErrorHandler::fatalError(). Their return values are used to determine whether to continue parsing or not.

OriginalCopy
18th March 2008, 17:41
QXmlDefaultHandler implements QXmlErrorHandler interface. See virtual methods QXmlErrorHandler::error() and QXmlErrorHandler::fatalError(). Their return values are used to determine whether to continue parsing or not.

Exactly, but the error is not triggered if the chracter '&' is not encoded as "&" in the value of an attribute