PDA

View Full Version : QXmlStreamReader and entity label



Suppaman
1st September 2013, 10:30
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

wysota
2nd September 2013, 23:05
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.

ChrisW67
3rd September 2013, 06:42
If you install your own QXmlStreamEntityResolver does it see the "xxx" or is it never given the entity to resolve?