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
Qt Code:
  1. QDomNode platform = domDocument.firstChild();
  2. platform=platform.firstChild();
  3. while (!platform.isNull())
  4. {
  5. QDomElement e = platform.toElement();
  6. cout<<e.tagName().toStdString();
  7. platform=platform.nextSibling();
  8. }
To copy to clipboard, switch view to plain text mode