Results 1 to 3 of 3

Thread: SAX2 error recovery

  1. #1
    Join Date
    Nov 2007
    Posts
    35
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default SAX2 error recovery

    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.
    Last edited by OriginalCopy; 12th March 2008 at 22:23.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: SAX2 error recovery

    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.
    J-P Nurmi

  3. #3
    Join Date
    Nov 2007
    Posts
    35
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: SAX2 error recovery

    Quote Originally Posted by jpn View Post
    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

Similar Threads

  1. DOM or SAX2 xml handling?
    By bhs-ittech in forum Qt Programming
    Replies: 9
    Last Post: 14th March 2007, 16:31

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.