Chris Angus wrote:
>
> I looked at HaXml a while ago
> and it seemed to offer a very Dom-like interface.


You could say that it's DOM-like in that it deals
with trees instead of an event stream, but it's actually
somewhere in between SAX and DOM.

The main difference between HaXML and DOM is that
in the DOM, nodes have object identity and it's
possible to access parent and sibling nodes (which
implies access to the entire tree tree starting from
any node).  With HaXML, you can only get to the subtree
rooted at a particular node.

[HaXML also encapsulates a lot of the plumbing and is relatively
cruft-free, which makes it considerably more pleasant to use
than the DOM in my opinion, but that's a secondary issue.]


> I was wondering if anyone had thought of making a Sax-like
> interface based on lazy evaluation. where tokens are
> processed and taken from a (potentially) infinite stream

The HaXML combinators actually have very nice laziness properties.
HaXML as a whole (at least the last time I looked at it)
is stricter than it needs to be -- because the XML parser
processes the entire input document before returning the
root node -- but a combination of the HaXML combinators
and Ketil Malde's parser would give the best of both worlds.


--Joe English

  [EMAIL PROTECTED]

Reply via email to