[XML-SIG] what is SAX?

Lars Marius Garshol larsga@ifi.uio.no
23 Mar 1998 18:55:56 +0100

* Jeffrey P. Shell
| I'm apparently even more out of the loop than I though, but: what is
| SAX? 

It's a common API for XML parsers, hence the name: Simple API for
XML. It's event-driven and rather straightforward to use. There are
now Java and Python implementations with drivers for most of the
available parsers in those two languages.

| Is SAX part of the XML spec that I've missed? 

No, it was developed by the members of the xml-dev list to solve the
parser API problem before DOM[1] arrived. (And SAX is also useful for
many simpler applications where DOM would be overkill.)

| Or is it just something really groovy that I'm just not aware of
| yet? :-)

It's really groovy, yes. :) Especially since it means that you may
write your Python XML application without caring whether the user uses
the C XML parser module or a pure Python one.

[1] Document Object Model, the W3Cs common tree-based parser API.
    (Well, it's really a bit more than that since it allows you to
    change the document as well.)

"These are, as I began, cumbersome ways / to kill a man. Simpler, direct, 
and much more neat / is to see that he is living somewhere in the middle /
of the twentieth century, and leave him there."     -- Edwin Brock

 http://www.stud.ifi.uio.no/~larsga/      http://birk105.studby.uio.no/