[XML-SIG] Reconsidering the DOM API

Patrick Phalen xml-sig@teleo.net
Wed, 28 Jun 2000 23:03:10 -0700

[Michael McLay, on Tue, 27 Jun 2000]
:: Perhaps it is time to step back and ask how easy XML could be if
:: the Python interface had nothing to do with SAX or DOM.

How easy? Having just read through Sean McGrath's impressive new book,
_XML Programming with Python_, I'd have to answer "very easy indeed."

Sean's notion of using the very simple, Python friendly, Pyxie API is
atttractive. I admit I was suspicious of the idea at first, but became
a convert after seeing it in action. It allows me to do the great
majority of XML work I face in a comfortable, Pythonic way.

His further notion that Pyxie should support language-independent XML
processing APIs (namely SAX and DOM) in a compatibility layer is also a

I'm frankly surprised to have seen no discussion of Pyxie for inclusion
in the XML core. Why is that? Let's review its pedigree:

* Based on James Clark's ESIS -compatible parsers, sgmls and nsgmls.

* Open source (see http://www.pyxie.org).

* Written by the author of _XML by Example_, a computer scientist who
teaches Smalltalk and Java at college, but prefers Python for his own

* Showcased in the first (and so far only) published book about Python
and XML.

In other words, Pyxie has a lot going for it, both as a marketing
vehicle for Python as an XML language and as a great tool. It
certainly seems to deserve a place beside the other weapons in the

Python has a growing reputation as a natural language for XML work. It
seems to be attracting a lot of new users for this reason. Some, of
course, will want to work immediately with SAX and the DOM, for
job-related or other reasons. But if others have a chance to see how
much they can accomplish quickly and painlessly, without hassling with
"lowest common denominator" DOM and SAX issues, so much the better, eh?

I've been fooling around with Pyxie and I have to attest to the fact
that it's effective and fun, befitting a Pythonic solution.

With Pyxie as potential "middleware" between Python and the DOM,
perhaps we don't immediately have to worry about precise interface