[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XMLContainer question



On Wednesday 21 March 2001 01:20, Milind Phadke wrote:

> > Hello Ozonites,
> I am trying to use Ozone/XML for persistent storage of my XML. I will need
> to support add/delete/modify/get operations on this XML. My questions is,
> which strore method should I use? storeSAX() or storeDOM(). The API doc
> suggests to use storeSAX for performance. I suspect that may be I will save
> space with storeSAX() but will be doing more computation compared to
> storeDOM() to support the above mentioned operations. Any ideas/suggestions
> are welcome.

Whether you use storeDOM or storeSAX depends on how your client handles your 
XML data. (It has nothing to do with how Ozone stores the XML - it's always 
stored the same way.)

If you just read an XML file from disk and want to store in Ozone storeSAX is 
faster because SAX does not create that much objects like DOM and the 
client-server-communication of the XMLContainer is SAX based. DOM has to be 
converted to SAX, which takes some time.

If your application uses DOM you wouldn't gain any benefit by converting it 
to SAX and using storeSAX, thus using storeDOM would be appropriate.

For the add/delete/modify/get operations you may use the XUpdate 
(add/delete/modify) and XPath (get) API.

regards,
Conny Krappatsch