From: "Simon St.Laurent" <simonstl / simonstl.com>
> People coming from Java may expect DOM, but even Java has JDOM and
> DOM4J.  Perl's implementations are all over the map, and Python
> certainly has variety.  I don't think there's anything especially
> magical about DOM that demands a DOM implementation have high priority.

DOM is really designed to support scripts that are written to manipulate an
XML or HTML document in many different environments, in which case the DOM
implementation will be provided by the environment. E.g. an environment
might be a browser, or an ASP-like server.

This raises some issues.

Firstly, I don't think that this is the kind of environment in which most
people are currently using Ruby to manipulate XML or HTML, so a Ruby-esque
interface to XML would be more useful than a DOM interface.  It would be
nice if IE, Mozilla, ISS, etc. supported Ruby in the future, but we can
cross that bridge when we come to it.

Secondly, the DOM implementation is meant to be provided by the execution
environment, so a pure-Ruby DOM implementation is not that important.
Rather, standard Ruby bindings to the DOM should be defined, that can be
implemented by the Ruby runtime for the application server.

Finally, if a Ruby-eque API for XML processing was significantly more
convenient than a DOM or DOM+XPath API in other languages, it would be a
good selling point for the Ruby language and would encourage people to give
it a try.

So, my opinion is that a DOM implementation is not as high a priority for
Ruby as a streaming parser, such as SAX.

Cheers,
            Nat.

________________________________
Dr. Nathaniel Pryce
B13media Ltd.
40-41 Whiskin St, London, EC1R 0BP, UK
http://www.b13media.com

XP Day, London, UK. 15th December 2001. http://xpday.xpdeveloper.com/