Nice quote

Paul Boddie paul at
Thu Apr 10 13:52:36 CEST 2003

"Jeremy Bowers" <jerf at> wrote in message news:<pan.2003. at>...
> On Sat, 29 Mar 2003 07:54:58 -0500, Peter wrote:
> > 

[Tim Bray's comments]

> > Basically, he was conveying that Python people don't find processing XML
> > to be a huge problem in any particular way, and I think that's a fair
> > assessment.  IMHO.
> I didn't take his statement that way because it doesn't make sense some to
> me. I've done SAX and DOM in both Perl and Python and they are equal pains
> in the ass.

My interpretation of the "Python people's" presumed statement of
contentment, via Mr Bray's interpretation of that statement, is that
there exists a collection of Python libraries/modules which implement
contemporary XML processing standards to a satisfactory level such
that real work can be done with them. While I remain unsettled by
various versioning issues with PyXML and 4Suite (the main packages for
XML in Python), it is true that they provide decent functionality and,
due to their adherence to standards, are accessible to people like Mr
Bray who come from the wider XML community.

As to whether SAX or DOM are good APIs or not, I personally only
"touch down" on the DOM API when I've made use of other techniques
(notably XPath). Having not read the DOM specification cover-to-cover,
I can't claim to be an authority on DOM, but it always surprises me
that people bring out the "DOM means loading everything at once" when
it is conceivable that implementations could actively avoid such
strategies. That's a side issue, however.


> The gnosis.xml packages *are* easier then standard DOM processing, and at
> least reduce XML to relatively straight-forward tree processing, though as
> the author of those utilities mentioned, I doubt Tim Bray was thinking of
> those since Tim doesn't know Python. However it's possible that the
> "Python people" mailing Tim may have been thinking of that.

I'm not familiar with gnosis.xml, but it seems to me that non-standard
approaches (particularly the "Pythonic" APIs) would not be of
significant interest to someone who wants to remain close to the
standards. Moreover, from what I've seen of the "Pythonic" element
tree APIs, I don't see anything radically better than the DOM - yes,
the notation may be nicer or cleaner, but there isn't anything obvious
with any of them that provides the benefit that something like XPath
can give, as far as I have seen.


> I'm still probably going to noodle around more later with a new library
> for Python that will actually construct an object model out of objects you
> provide for it, but it would be a long time before it would be publicly
> available because I'd want to use it in a lot of situations before I could
> be confident it was powerful enough.

My personal belief is that the XML and RDF technologies provide
sufficiently interesting standardised means of querying and
manipulating object hierarchies that one would be best suited by
staying as close to the standardised object models as much as


More information about the Python-list mailing list