I have member function for parsing XML like this:
void xmlparser::parsingFunction()
{
while(1)
{
QFile file("info.xml");
if(!file.open(QIODevice::ReadOnly | QIODevice::Text))
{
qDebug("Failed to open file for reading");
}
QDomDocument document;
if(!document.setContent(&file))
{
qDebug("Failed to parse the file into a Dom tree");
file.close();
}
file.close();
QDomElement documentElement = document.documentElement();
QDomNode node = documentElement.firstChildElement();
while(!node.isNull())
{
if(node.isElement())
{
QDomElement first = node.toElement();
emit xmlParsed(first.tagName());
sleep(5);
}
node.nextSibling();
}
}
}
My xml tree looks like this http://pastebin.com/nFMJKcmU
I am not sure why It doesn't show all the available tags in root element info