Hi!
I need to parse this xml file of this structure:
<tcdescription>
<platform type="common">
<id>wdt_0003</id>
<owner>TB</owner>
<requirement>random_requirement</requirement>
<type id="module"></type>
<style type="automatic"></style>
<module>WDT</module>
<level id="0"></level>
<effort unit="h">1</effort>
<startertimeout>100000</startertimeout>
<description>
bla bla
</description>
</platform>
<platform type="vgca" os="Windows">
<activated status="true"></activated>
<timeout>bla bla</timeout>
<trace use_automatic="yes"></trace>
<debug use_automatic="yes"></debug>
<compilation type="debug" default="yes">
<executable>bla bla</executable>
</compilation>
<compilation type="release">
<executable>bla bla</executable>
</compilation>
</platform>
<platform type="vgcb" os="Windows">
<activated status="true"></activated>
<timeout>bla bla</timeout>
<trace use_automatic="yes"></trace>
<debug use_automatic="yes"></debug>
<compilation type="debug" default="yes">
<executable>bla bla</executable>
</compilation>
<compilation type="release">
<executable>bla bla</executable>
</compilation>
</platform>
</tcdescription>
--------------------------------------------------------
I use this code
QDomNode platform
= domDocument.
firstChild();
platform=platform.firstChild();
while (!platform.isNull())
{
cout<<e.tagName().toStdString();
platform=platform.nextSibling();
}
QDomNode platform = domDocument.firstChild();
platform=platform.firstChild();
while (!platform.isNull())
{
QDomElement e = platform.toElement();
cout<<e.tagName().toStdString();
platform=platform.nextSibling();
}
To copy to clipboard, switch view to plain text mode
Bookmarks