% A DOM holds the entire XML document in memory
It doesn't have to. One question for the world at large: is there a DOM
implementation that either parses lazily or creates the tree on disk?
I've often thought of that, but as yet I haven't seen one. With VB, I
assume the original poster was using MSXML anyway.
To be honest, I gave up on DOMs for handling data when I abandoned XML
in favour of RDF. Now I use Jena and a database-backed triple store,
so that's effectively what I'm getting.
It's actually quite an awkward task to "parse lazily" in a useful
manner, which is one of those issues that RDF had to address a long
time ago. You can lazy-parse XML quite easily, but this is only
useful if your demands on the data model are similar to the linear
serialisation. When they're not, things get hairy.