[Qt-interest] complete QDomNode to QString
Eckhard Jokisch
e.jokisch at orange-moon.de
Wed Apr 20 16:40:26 CEST 2011
Hi,
I have the following XML-data in a QDomDocument:
<THE-VALUE>
<foo-xhtml:h1>
This is an object.
</foo-xhtml:h1>
</THE-VALUE>
Now I want to have
"<foo-xhtml:h1>
This is an object.
</foo-xhtml:h1>"
in a QString to pass it on to a QWebView which should show this as a heading.
This is what I tried but it only stores "This is an object" in QString value:
QDomNode node; //node contains the parent node of "<THE-VALUE>
QString value;
value=node.firstChildElement("THEVALUE").firstChild().toElement().text();
How do I get the "foo-xhtml:h1" tag also into the string?
Thanks in advance
Eckhard
More information about the Qt-interest-old
mailing list