XML

A.M. Kuchling amk at amk.ca
Tue Jun 24 09:01:25 EDT 2003


On 24 Jun 2003 01:52:27 -0700, 
	Paul Boddie <paul at boddie.net> wrote:
> The thing is that Python and its developers quite often have to live
> (and work) alongside other technologies; having a set of common APIs
> is important if you consider them in that context.

In practice, there's no way to access those other technologies from Python.
There's a Python wrapper for the Xerces DOM implementation, but I never hear
about anyone using it; there's a wrapper for libxml2, but it has its own 
API that's somewhat similar to ElementTree (but not as nice to use --
someone should fix that, because libxml2 is blazingly fast).  So any DOM
implementation you use will likely have been built by the Python world, and
could have been written to a standard interface. Jython users could use the
Python interface or use the Jython mapping of Java interfacers. 

When you think about it: how useful is it that the Python DOM interface uses
the same method names as the Java or Perl interface?  What's gained by this?
I initially thought there might be some gain from being able to use material
written for other languages to learn the API, but don't know how most users
learn the DOM; do they read the DOM Recommendation, look at tutorials, read
the implementation source, or just copy existing code?

In this context, I find the existence of jDOM, a Java-centric DOM-like API, 
to support this view.  There's even a jDOM JSR, the Java world's equivalent
of a PEP.

--amk




More information about the Python-list mailing list