Lists Home |
Date Index |
On Fri, Jan 25, 2002 at 11:29:51AM -0700, Sterin, Ilya wrote:
| >In SAX, the parser is has the
| >control loop and thus this makes SAX parsers easy to write. In
| >DOM the control loop is owned by the library's user.
| That said, it again brings us down to that SAX parsers all (most)
| follow the push model, and DOM based follow the pull model.
DOM  uses a random-access, pull-flow-control interface.
SAX  uses a sequential-access, push-flow-control interface.
XPP  uses a sequential-access, pull-flow-control interface.
| > I've only just begun playing with random access push
| > models... this is more or less events that can be replayed
| For the push model to be replayed, probably means that it
| will have to keep a parts in memory, or reparse all over again?
Yes. To offer random access an interface will probably elect
to keep an in-memory representation. Although a random access
interface could be done over a database (see Tamino), etc.
| This means that we are back to in memory parsers right, or is
| there some other concept behind it?
Right. The examples above give you 3 permutations, one
could develop an interface which used random-access but
push-flow-control. I started to put together an interface
for this about a year back... it had a way for events
to be "re-played". I stopped after I didn't see an
obvious application of the technique.
Clark C. Evans Axista, Inc.
XCOLLA Collaborative Project Management Software