Results 1 to 2 of 2

Thread: QXmlStreamReader error on reading empty element

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2012
    Posts
    244
    Thanks
    27
    Thanked 15 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QXmlStreamReader error on reading empty element

    When i parse an XML document using the QXmlStreamReader class, i am presented with an error if i call "readElementText()" on an empty element and my parsing is interrupted. The error is:
    Expected character data.
    Apparently, this is expected behavior.

    So how can i know whether an element is empty or not?

  2. The following user says thank you to tuli for this useful post:


Similar Threads

  1. Reading and rereading a file with QXmlStreamReader
    By TheRonin in forum Qt Programming
    Replies: 14
    Last Post: 30th April 2015, 14:04
  2. Replies: 9
    Last Post: 22nd February 2013, 12:27
  3. Replies: 9
    Last Post: 23rd April 2012, 13:53
  4. QXmlStreamReader not reading text within tags
    By Ceaser88 in forum Newbie
    Replies: 2
    Last Post: 24th July 2011, 10:06
  5. Replies: 0
    Last Post: 26th May 2010, 19:01

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.