Results 1 to 3 of 3

Thread: [Closed] Read an XML file into memory

  1. #1
    Join Date
    Jun 2006
    Posts
    18
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question [Closed] Read an XML file into memory

    Hi,

    I have data stored in an XML file. The data is similar to a table of two columns and a few lines (about 10 lines). I have read the XML file with the QXmlStreamReader Class.
    My question is :
    What is it the best way to store this data into the memory of the computer, so that i can read it many times in my program ?

    Thanks for the answer.

    Regards.
    Last edited by marvaneke; 25th March 2008 at 15:52. Reason: thread closed

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Read an XML file into memory

    You can read the XMl file in a QDomDocument object.
    Later u can access the contents thru QDomElement class and its functions.

    Hope this helps

  3. The following user says thank you to aamer4yu for this useful post:

    marvaneke (25th March 2008)

  4. #3
    Join Date
    Jun 2006
    Posts
    18
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Read an XML file into memory

    I will look at your suggestion.
    Thanks a lot for the (too ;-) ) quick answer.
    Regards.

Similar Threads

  1. memory leaks
    By Fastman in forum Qt Programming
    Replies: 1
    Last Post: 5th March 2008, 08:00
  2. How to read text only as it is from file
    By thomasjoy in forum Qt Programming
    Replies: 3
    Last Post: 9th August 2007, 08:47
  3. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  4. How to read line from file
    By Krishnacins in forum Newbie
    Replies: 10
    Last Post: 1st June 2006, 23:14
  5. Replies: 13
    Last Post: 1st June 2006, 14:01

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.