[Qt-interest] How to: parse an xml file with tags
Andre Somers
andre at familiesomers.nl
Tue Feb 16 09:12:30 CET 2010
Mohammed Imran B wrote:
> Hi,
>
> I have the data something like this:-
> "<data>
>
> <ID>id1000</ID>
>
> <Name>name5</Name>
>
> <Phone>9008354576</Phone>
>
> </data>
>
> "
>
>
> I want the content present in the tags ( id1000, name5, 9008354576).
>
>
> Is there any sample example of such a kind or is there any APIs that
> could help me in doing this.
>
>
> Thanks and regards,
>
> Imran.
>
Sure. Qt has three sets of XML parsing/writing API's. All would probably
work for you, though I'd start with reading up on QXmlStreamReader.
BTW: in XML speak, the items containing your data are called elements,
not tags.
André
More information about the Qt-interest-old
mailing list