PDA

View Full Version : QT 4 Xml parsing with special characters



KrishnaKishan
18th June 2007, 11:13
Hi,
I have to parse an xml file, which contains "%" as a text of a node.

QDomelement.text() returns nothing.

example:
<TD>%</TD>

fullmetalcoder
18th June 2007, 11:53
Assuming that "e" is the element whose tagName() is "TD", here is the code you'll need to extract your "%" :

text = e.firstChild().toText().data();

:)