Hey,
Consider the following XML file :
<cookbook>
<recipe xml:id="MushroomSoup">
<title>Quick and Easy Mushroom Soup</title>
<ingredient name="Fresh mushrooms"
quantity="7"
unit="pieces"/>
<ingredient name="Garlic"
quantity="1"
unit="cloves"/>
</recipe>
<recipe xml:id="AnotherRecipe">
<title>XXXXXXX</title>
<ingredient name="Tomatoes"
quantity="8"
unit="pieces"/>
<ingredient name="PineApples"
quantity="2"
unit="cloves"/>
</recipe>
</cookbook>
Let's say I want to parse this file and gather each recipe as XML, each one as a separated QString.
For example, I would like to have a QString that contains :
<recipe xml:id="MushroomSoup">
<title>Quick and Easy Mushroom Soup</title>
<ingredient name="Fresh mushrooms"
quantity="7"
unit="pieces"/>
<ingredient name="Garlic"
quantity="1"
unit="cloves"/>
</recipe>
How could I do this ? Do you guys know a quick and clean method to perform this ?
Thanks in advance for your help !