QXmlStreamReader help
-
I created this xml file with QXmlStreamWriter:
<?xml version=“1.0” encoding=“UTF-8”?>
<Draw>
<Input>
<Column title=“A”/>
<Column title=“B”/>
<Column title=“C”/>
<Column title=“D”>
<item id=“0”>Bayer Leverkusen</item>
<item id=“1”>Benfica</item>
<item id=“2”>Villareal</item>
<item id=“3”>Montpellier</item>
</Column>
</Input>
</Draw>I would like to create a Vector of String containing all the items inside the tag <Column title="D">: Now, I know how to create a QVector and how they fit elements on the inside, I just have to figure out how I can do this by extrapolating information from an xml file.
Can you help me?
-
Hi,
I'm not quite sure what you're asking.
Do you want help with writing more things to your XML file? Or do you want help on reading the file?
-
Sorry, I made a mistake writing the title. I need help to read the file, since I have not found very clear examples on the net.
-
Here is one that can help, although old it is still the same...
http://developer.nokia.com/community/wiki/QXmlStreamReader_to_parse_XML_in_Qt