Results 1 to 11 of 11

Thread: Using SAX to parse XML

Threaded View

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

    Default Re: How to read a xml file in qt?

    The DOM approach loads the entire document into a defined in-memory structure that you can later randomly access and manipulate using defined functions. For files like settings or XML representations of an editable document this is often a good choice.

    The SAX approach asks you program to react to a parts of a stream of XML as it arrives, either by reading from a file or across a network etc., and do something there and then. For constructing your own in-memory data structures or performing some immediate action in response to the XML in a single pass SAX is a good choice.

    Efficiency generally says that you do not rewrite something that works, i.e. your DOM solution, unless there is a good reason. What are you trying to achieve?

  2. The following user says thank you to ChrisW67 for this useful post:

    sudha (20th January 2012)

Similar Threads

  1. parse xml
    By vinayaka in forum Newbie
    Replies: 1
    Last Post: 3rd October 2011, 17:42
  2. how to parse xml with a image using qt?
    By bezlew in forum Qt Programming
    Replies: 1
    Last Post: 3rd November 2009, 10:04
  3. parse xml
    By rmagro in forum Qt Programming
    Replies: 2
    Last Post: 2nd July 2009, 23:27
  4. XML parse
    By arunredi in forum Newbie
    Replies: 2
    Last Post: 27th April 2008, 02:22
  5. Best way to parse a string
    By Lele in forum Qt Programming
    Replies: 3
    Last Post: 20th August 2007, 13:33

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.