PDA

View Full Version : XMLDomElement text gives text of all child nodes



rbbq
17th February 2011, 16:35
So i have some variables:
QString result;
QDomElement element;

Element is parsed from an xml file and childnodes with attributes, some of them contain text.

So i know how to walk through the DOM tree and i want text from specific childnodes, but

result += element.text();

returns me the text ALL childnodes.. but i only want the text from the one element and not its childs...

How do i do that?

Thx in advance

stampede
17th February 2011, 17:12
Maybe post example xml and the output you expect to get.