Originally posted by Tariq Ahsan:
Wondering if DOM is still slow and a memory hog compare to using SAX? I like to use DOM as I need to parse multiple attributes within a particular node of a big (~100 meg) xml file.
Reid - SCJP2 (April 2002)
Reid - SCJP2 (April 2002)
Originally posted by Tariq Ahsan:
Thanks Reid for your response. Do you think in terms of performance and memory usage it make sense to use DOM instead of SAX for parsing a large xml file where I am just going to search for a particular node and parse it's attributes and dump it into a delimited text file? I am inclined to use DOM because of it's ease of handling elements.
Originally posted by Tariq Ahsan:
Thank you all for your suggestions. Just wondering if you guys have some sample code, ideas or suggestions how I could come up with passing the node name as an argument to get the attributes belong to it.
Thanks
Originally posted by William Brogden:
Which implementation is "lazy loading" a DOM?
I'd bet money that the Java JAXP implementation does not. The parser has to completely parse the document before returning.
Bill
Reid - SCJP2 (April 2002)
Something about .... going for a swim. With this tiny ad ...
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|