Results 1 to 2 of 2

Thread: How to parse this XML and append in QTreeWidget?

  1. #1
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default How to parse this XML and append in QTreeWidget?

    Qt Code:
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <relation version="1.0">
    3. <Friends>
    4. <first name="ravi"></first >
    5. <display name="ravi kumar"></display>
    6. </Friends>
    7. <Friends>
    8. <first name="balaji "></first >
    9. <display name="arun balajir"></display>
    10. </Friends>
    11. <Friends>
    12. <first name="kumar"></first >
    13. <display name="kokki kumar"></display>
    14. </Friends>
    15.  
    16. </relation >
    To copy to clipboard, switch view to plain text mode 

    How to parse this xml and retrieve first name and display name. And I want to show only display name in QTreeWidget and if user clicks on the display name, the value to be used should be corresponding first name.. How to achieve this??

  2. #2
    Join Date
    Dec 2012
    Posts
    90
    Thanks
    5
    Thanked 20 Times in 18 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to parse this XML and append in QTreeWidget?


Similar Threads

  1. parse xml
    By vinayaka in forum Newbie
    Replies: 1
    Last Post: 3rd October 2011, 16:42
  2. parse items of QTreeWidget into file/QSettings
    By Mystical Groovy in forum Qt Programming
    Replies: 3
    Last Post: 8th November 2009, 16:52
  3. parse xml
    By rmagro in forum Qt Programming
    Replies: 2
    Last Post: 2nd July 2009, 22:27
  4. Cannot append to QFile using QIODevice::Append
    By philwinder in forum Qt Programming
    Replies: 4
    Last Post: 17th November 2008, 09:09
  5. XML parse
    By arunredi in forum Newbie
    Replies: 2
    Last Post: 27th April 2008, 01:22

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
  •  
Qt is a trademark of The Qt Company.