thnkwthprtls
26th November 2013, 18:22
I have a QDomDocument called doc and I need to make a QStringList of each of its top-level children. So far I have this:
QDomNodeList nodes = doc.childNodes();
for(int i = 0; i < nodes.size(); i++)
{
QDomText text = nodes.at(i).toText();
//do something here...
}
However, I cannot find any way to convert this to a QString. This is my first time ever working with The QDom* classes, so I'm pretty confused, and going by the docs there doesn't seem like much can be done with QDomText. Can anyone please offer some advice? Thanks in advance!
QDomNodeList nodes = doc.childNodes();
for(int i = 0; i < nodes.size(); i++)
{
QDomText text = nodes.at(i).toText();
//do something here...
}
However, I cannot find any way to convert this to a QString. This is my first time ever working with The QDom* classes, so I'm pretty confused, and going by the docs there doesn't seem like much can be done with QDomText. Can anyone please offer some advice? Thanks in advance!