From: Jim Menard Date: 2001-03-09T11:40:02+09:00 Subject: [ruby-talk:12309] Re: [ANN] NQXML v0.2.2 jweirich@one.net writes: > I always figured a SAX parser was one that followed the SAX API spec. > Since SAX is written assuming a Java implementation, deciding what is > SAX compliant in a different language is open to some interpretation. > The NQXML parser is definitely event based, but is different enough > from the style of the original Java SAX that I would hesitate to apply > the SAX label to it. Maybe I should stop calling it a SAX parser. > But then, being SAX compliant is only important if you want to be able > to switch between two or more SAX implementations. There is nothing > wrong with NQXML being a non-SAX event driven parser. In fact, I > don't believe its possible to build a DOM parser on top of a pure SAX > parser (e.g. SAX doesn't deliver comments, so it is impossible to > include comment nodes in a DOM document built with a pure SAX parser). Oops. My pseudo-SAX parser delivers comments. I obviously haven't read the SAX spec. I should definitely stop calling it a SAX parser. (Now to come up with a clever name...) > If SAX compatibility is important, it should be easy to add a SAX > adapter to NQXML in the future. Perhaps someone else will build one on top of the NQXML::Tokenizer. BTW, the example scripts I'm coming up with (using both the DOM and mis-named SAX parsers) really show off Ruby. I will be uploading them and posting them to the NQXML Web site in a day or two. Jim -- Jim Menard, jimm@io.com, http://www.io.com/~jimm/ "Rumor has it the internet is out of money. Pack your stuff and go home." -- "Pud", www.f***edcompany.com