Announce: Pyxie - an Open Source XML Processing Library for Python

Sean Mc Grath digitome at iol.ie
Sat Dec 18 10:00:22 EST 1999


On Sat, 18 Dec 1999 11:35:01 +0000, Robin Becker
<robin at jessikat.demon.co.uk> wrote:

>Can someone explain in simple terms what the real advantages of XML as
>an intermediate language are?
>
>I understand that it's a data description language, but aren't there
>other more compact languages for data description?
>
>Almost all modern programming languages have some means for describing
>data items or objects or classes or whatever. Why don't we have a
>derivative of C++ or python or whatever for data description?
>
You are right that there are lots of ways to achieve what XML achieves
- an intermediate data interchange format. Personally, I have used
Python for this purpose many times. There is something beautiful about
reading data into an application by simply saying:
	from InterchangeFormat import config

where config is some rich Python data structure represented
in plain text. This piggy back on
Python's ability to parse its own data structures (duh!) to avoid
hand-crafting any type of data interchange notation parser.

Lispers of course do this kind of thing all the time with
s-expressions.  XML does the same thing but does it in a language
independent notation.

The intent of Pyxie is to provide a Pythonic interface to this
language independent notation so that you can think in terms of Python
data structures and control flows without worrying too much about the
underlying syntax.

The SAX and DOM APIs also serve as buffers between the programmer and
the raw notation but both of these are language indepdent APIs. As a
result, they cannot  take advantage of Python features we all know and
love. I do basically all my XML work in Python/Pyxie. I and am not
terribly worried about maintaining a language independent mind-set for
XML processing.

Pyxie is not for everyone by any stretch of the imagination. There is
an undeniable benefit from a management perspective of being able to
source expertise at the SAX/DOM level and know that that expertise can
become productive quickly whatever the programming environment - C++,
Java, Python whatever.

Pyxie is unashamedly wedded to Python. My long term goal with it is to
layer SAX and DOM on top of it so that developers would be able to
choose between a Pythonic interface and a language independent
interface for their Python/XML work.

I have said this before but I will say it again. Python IMHO beats
that pants off both Java and Perl for XML processing. I believe XML
presents a real opportunity for the Python community. Between the
XML-SIG materials, Pyxie, Zope/XML, f-bots XML-RPC, Greg Steins qp_xml
Python is becoming a real contender for XML application development.

Side note : At XML'99 in Philadelphia last week, Henry Thompson
announced that he had written the hard bits of an XML Schema
implementation in Python in just a couple of weeks. Nobody batted an
eyelid! Everybody *knew* what Python is and what it is capable of.

There were two full day Python tutorials at XML'99. Both Paul Prescod
and I had the same experience : developed at these tutorials already
knew about Python and wanted to get straight to the details of using
it for XML processing. This constrasts dramatically with one year ago
when nobody at my tutorial knew anything about Python.

In the space of one year, Python-awareness in the XML world has
skyrocketed.

regards,




More information about the Python-list mailing list