Results 1 to 3 of 3

Thread: QXmlStreamReader and entity label

  1. #1

    Default QXmlStreamReader and entity label

    Hi all

    I'm using the QT object QXmlStreamReader for parse and read an xml file. It work very well except for a thing I'm currently not able to figure out. In the xml I need to parse there are some node contain entity tag. For make and example check the following lines:

    .....
    <!ENTITY xxx "entity text">
    .....
    <test>&xxx;</test>
    .....

    When, using QXmlStreamReader, I get the "test" node (QXmlStreamReader::Characters) using function text() return me "entity text" that is correct in normal mode. However I need to have the entity label instead of entity text. This mean, once found the node "test" I need to get the label "xxx" instead of corresponding text.

    Is there a way to get this data?

    Thank you

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QXmlStreamReader and entity label

    Probably no. You could try with the entity resolver or using QXmlStreamReader::isEntityReference() but I wouldn't count on any of the two too much.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QXmlStreamReader and entity label

    If you install your own QXmlStreamEntityResolver does it see the "xxx" or is it never given the entity to resolve?

Similar Threads

  1. QXmlStreamReader help?
    By nthung in forum Newbie
    Replies: 2
    Last Post: 4th October 2011, 10:03
  2. QXmlStreamReader
    By sophister in forum Qt Programming
    Replies: 6
    Last Post: 24th August 2011, 18:31
  3. HttpHeader Request only part of an entity
    By nhs_0702 in forum Qt Programming
    Replies: 21
    Last Post: 25th April 2010, 10:35
  4. Need help with QXmlStreamReader
    By jknotzke in forum Qt Programming
    Replies: 2
    Last Post: 26th October 2009, 10:26
  5. Special character's HTML entity to string
    By Hiba in forum Qt Programming
    Replies: 4
    Last Post: 3rd March 2009, 15:05

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.