PDA

View Full Version : QByteArray Variable Parsing



sai_3289
7th January 2013, 10:22
I have a QByteArray postData...WHere the postData contains data like dis
"<?xml version="1.0"?>
<EntryGateDetails>
<EntryDate>2013-01-05 12:49</EntryDate>
<UserID>35199</UserID>
</EntryGateDetails>

Now how can i parse these...?

Santosh Reddy
7th January 2013, 10:39
Load this QByteArray in to a QDomDocument, and read the childred (QDomElements), and then the tag names (EntryGateDetails, EntryDate, UserID, etc..)

wysota
7th January 2013, 12:31
Or use QXmlStreamReader.