Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QXmlDefaultHandler fatalError\error\warning are not triggered during invalid XML doc parsing

QXmlDefaultHandler fatalError\error\warning are not triggered during invalid XML doc parsing

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    ixSci
    wrote on last edited by
    #1

    Hello!

    I've encountered the situation which is described in the topic theme above. I have: invalid XML document(incomplete tags, e.g <tag> without close </tag>), custom class which inherits QXmlDefaultHandler and overrides fatalError\error\warning virtual methods. I fed my invalid XML to the parser and it returned false but none of fatalError\error\warning methods were triggered.
    Does anybody know something about such behavior? Is it a bug or an undocumented feature? :)

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      Did you set

      @
      xmlReader.setErrorHandler(handler);
      @?

      See "QXmlDefaultHandler/Detail Descripton":http://doc.qt.nokia.com/4.7/qxmldefaulthandler.html#details for code snippets.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • I Offline
        I Offline
        ixSci
        wrote on last edited by
        #3

        Doh! I've totally misinterpreted Qt docs. Volker, thank your for opening my eyes

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved