Hi mark,

The SAX API is very different from the DOM API - in DOM you have nodes
and you can investigate their properties and their children - this
means the document must be in memory. With SAX you get callbacks for
different events - you do not have nodes. You can create callbacks for
open tags, close tags, text, etc. This saves on memory usage, but...
you have no DOM nodes...

Cheers, jas.

On 10/2/07, Mark <[EMAIL PROTECTED]> wrote:
> I currently use TinyXML to export and import data from a server application to
> it's client. I load the export file into a TiXmlDocument. The classes in the
> client have a constructor that takes a TiXmlElement* as the argument, and the
> class properties are assigned from that.
>
> That works fine for small documents but with larger documents it can take up a
> lot of memory, so I thought I'd try using SAX with Xerces. I'd still like to
> pass a node object (whatever the Xerces equivalent is) to the client classes 
> but
> I can't see that the events for the SAX parser give me anyway of accessing the
> actual xml, aside from rebuilding the node. Rebuilding the node becomes
> difficult because I need an indication of depth for nested nodes.
>
> Is there any way of parsing a file one node at a time without descending to
> child nodes? Or rebuilding a node's xml?
>
> TIA
>
>

Reply via email to