elcuco
22nd May 2010, 18:15
I am using QXmlStreamReader to parse this kind of XML:
<xml>
<param>
<name>age</name>
<type>int</type>
<value>42</value>
</param>
<param>
<name>name</name>
<type>string</type>
<value>dr blabla</value>
</param>
<param>
<name>data</name>
<type>xml</type>
<value>
<age>12</age>
<hieght>1.78 meters</height>
<age>12</age>
</value>
</param>
</xml>
What I need to do, is to get the whole 3rd param into a QString (or an QXmlDocument or something, not sure what is the best approach here). The problem with QXmlStreamReader is that I don't see a way to "skip" the content of this tag/node and get it as a verbatim text or something.
What do you suggest?
<xml>
<param>
<name>age</name>
<type>int</type>
<value>42</value>
</param>
<param>
<name>name</name>
<type>string</type>
<value>dr blabla</value>
</param>
<param>
<name>data</name>
<type>xml</type>
<value>
<age>12</age>
<hieght>1.78 meters</height>
<age>12</age>
</value>
</param>
</xml>
What I need to do, is to get the whole 3rd param into a QString (or an QXmlDocument or something, not sure what is the best approach here). The problem with QXmlStreamReader is that I don't see a way to "skip" the content of this tag/node and get it as a verbatim text or something.
What do you suggest?