Results 1 to 3 of 3

Thread: QByteArray Variable Parsing

  1. #1
    Join Date
    Jul 2012
    Posts
    40
    Qt products
    Qt4 Qt/Embedded

    Default QByteArray Variable Parsing

    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...?

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: QByteArray Variable Parsing

    Load this QByteArray in to a QDomDocument, and read the childred (QDomElements), and then the tag names (EntryGateDetails, EntryDate, UserID, etc..)
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QByteArray Variable Parsing

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Parsing/extracting from a binary QByteArray
    By Phlucious in forum Qt Programming
    Replies: 4
    Last Post: 2nd December 2011, 20:15
  2. Replies: 1
    Last Post: 22nd June 2011, 09:12
  3. Replies: 1
    Last Post: 20th January 2010, 10:01
  4. Replies: 9
    Last Post: 25th July 2009, 14:27
  5. appending QByteArray with variable.
    By jjbabu in forum Qt Programming
    Replies: 3
    Last Post: 18th October 2007, 09:24

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.