XML vs Python?
paul at boddie.net
Mon Jan 20 12:29:36 CET 2003
Mike Brenner <mikeb at mitre.org> wrote in message news:<mailman.1042981114.9006.python-list at python.org>...
> Point 3. A "standard" object model might be better.
> The same in Python. We are nowhere near a good
> object model, nor does RDF, SVG, or any of the
> other complex applications based on XML come
> close to the level of the model we will shortly
> be needing.
Well, my point was that various nice tools are available to me if I
use stuff which provides standardised interfaces (dropping the
contentious "object model" terminology). For example, I find XPath
very useful. Unfortunately, without some effort on someone's part (it
could be my own), it looks like I can't use XPath with any of the
non-standard XML toolkits for Python, although I accept that it is
possible to implement XPath on top of various different "backends" -
take a look at Jaxen and how it nicely unifies the standard vs.
non-standard XML API mess on the Java platform.
Personally, I don't necessarily believe that the DOM is that nice, but
if I use DOM features, there's a chance that should I require better
performance, I can swap my XML implementation for a faster one and
retain all the code I've written. Such a near-trivial swap is
impossible if I want to go from one non-standard implementation to
another. Moreover, after such a swap, I can still use the nice tools
written for the DOM (like XPath); life is too short to have to write
XPath implementations for every toolkit you want to try just to
benchmark your application.
More information about the Python-list