[jdom-interest] Why JDOM is light weighted, but still have the Document in memory?
Daling Xu
daling.xu at sonexent.com
Thu Nov 1 14:46:31 PST 2001
Hi, All
In all the articals talk about JDOM, I always found people saying " JDOM is light weighted, it doesn't require the entire document to be in memory." but at the same time "It provides a full document view with random access".
I really can't understand this. SAX is light weighted and takes less memory because it's event driven, that't also the reason we can't "random access" the elements in the XML file.
DOM mapping the whole XML file into a tree hierarchy so we can have random access but that will take a lot of memory if the XML file is big. That's also understandable because we put all the data in the XML into memory.
To me, JDOM document is very similar to a DOM document, it's collected all the information in the XML file and built into a tree hierarchy, so we can have random access but SHOULD take a lot of memory. I know there must be some thing I misunderstood here, but what is it?
Any one can explain this to me? Or I need some example to "convince" me, say, build a JDOM document and a DOM document from the same XML file, then compare their size, but how to implement this experiment.
Thanks for any information. It's really haunting me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20011101/8cd462a9/attachment.htm
More information about the jdom-interest
mailing list