OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

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

Re: [xml-dev] DOM or SAX: Sense and Sensibility

> How often do you as experienced XML developers
> find people in your shop using DOM for work
> more appropriate to SAX?   Have you asked
> them why and what do they say?  What are the
> costs of picking the wrong API?

Might it be because there is no official SAX spec? (is there?) Nor is there a
conformance test suite (at least not one that I was able to find when I looked
some months ago).

I probably shouldn't really be replying here, as I'm _not_ an "experienced XML
developer" - yet.  Rather, I'm a newbie who's spent the last year learning as
much as I can about all things XML, mainly through reading everything I can
find (including this list) and experimenting with my own implementations of
various W3C specs (in the language Xbase++ - so far I've implemented XML 1.0
(both a native verion and an interface to Expat), DOM Level 2, namespaces,
DTD's/validation, XML Base, XPath, XML Schemas Part 2 ( Datatypes ),  a fair
whack of XSLT - since abandoned 'coz it was just too slow :-( , and am
currently finishing off an implmentation of RelaxNG.

In attempting to come to grips with RelaxNG, somebody on this list pointed me
towards pytrex.py, which I stidied pretty closely - and in the process I also
discovered how to do event-based processing (using Expat).  Until then, I only
had a theoretical notion of what it was about.

I had heard and read quite a lot about SAX, of course, and tried several times
to get into it, but without either a formal spec or a test suite, I just
didn't feel very motivated towards learning or implementing it - particularly
given that my DOM implementation seemed to work so well.  Of course, I haven't
yet had to work with multi-megabyte files or suchlike, so I haven't felt an
urgent need for SAX. ( a lack of  "labido" ?? )

I doubt there are many others as naive or as foolish as myself, but I do think
the ready availability of a formal spec and/or a conformance test suite would
serve to make SAX a _lot_ more approachable.  (And now I just know that
several people will jump forth to tell me that both of these things have
existed since Moses was a boy, and that there are more horses arses in this
world than there are horses! ;-) and of course - they're quite right! )