Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Reading a config file

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Nils Kilden-Pedersen" <nilskp AT gmail.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Reading a config file
  • Date: Fri, 20 Oct 2006 12:26:27 -0500

On 10/20/06, Elliotte Harold <elharo AT metalab.unc.edu> wrote:

I don't really believe that. I find SAX a lot easier to use for many use
cases than DOM. You just need to learn a couple of design patterns and
data structures and SAX becomes really easy. The issue is that many
programmers are much more comfortable with trees and iterators than
stacks and observers; but I don;t think SAX is fundamentally more
difficult than DOM; in fact quite the opposite. Even once you understand
trees and iterators there's still a huge number of nasty problems in
DOM to bite you whereas SAX is quite clean.


The problem with SAX is that you have to keep your own state, and you have
to read the data in the order it's been serialized in. It's just more work
than it's worth for parsing a config file.
For arbitrary data streams, it's fine, in fact it's great.




Archive powered by MHonArc 2.6.24.

Top of Page