Results 1 to 2 of 2

Thread: Parse huge XML file

  1. #1
    Join Date
    Apr 2012
    Posts
    21
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Parse huge XML file

    How to parse huge XML file (up to 8GB!) in Qt?
    It can't be DOM approach, because it takes too much memory, so is there any efficient and quick parser to deal with it?

    My XML file looks like this:
    Qt Code:
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <prog name="MST">
    3. <kaffe/>
    4. <c n="java/lang/Object" s="" r="0" />
    5. <c n="java/lang/Object" s="" r="0" />
    6. <n a="8184954" y="java/lang/String$ICComp" s="5" t="0" />
    7. <n a="8184824" y="java/lang/RuntimePermission" s="15" t="14" />
    8. <d a="8184954" t="14" />
    9. <c n="java/lang/Object" s="" r="0" />
    10. <n a="8184954" y="[C" s="25" d="1" m="15" t="2c" />
    11. <d a="8184824" t="37" />
    12. <d a="8184954" t="37" />
    13. </prog>
    To copy to clipboard, switch view to plain text mode 

    Elements I need are "n" and "d", and attributes "a", "s" and "t".

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Parse huge XML file


Similar Threads

  1. Parse xml file using QStreamReader
    By Gary.zhang in forum Qt Programming
    Replies: 0
    Last Post: 10th January 2011, 04:00
  2. Qwt plot + grid huge pdf file
    By giusepped in forum Qwt
    Replies: 3
    Last Post: 17th December 2008, 13:53
  3. Huge Text File
    By mcosta in forum Qt Programming
    Replies: 3
    Last Post: 11th January 2008, 19:23
  4. Replies: 13
    Last Post: 21st June 2006, 21:22
  5. How to parse this XML file ?
    By probine in forum Qt Programming
    Replies: 7
    Last Post: 4th April 2006, 09:05

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.