[Pipet Devel] and still more infrastructure things

Konrad Hinsen hinsen at cnrs-orleans.fr
Mon Mar 1 04:55:37 EST 1999

> That brings up a big question I had, and where I've been getting confused...
> Is there really any such thing as an "XML object"?  I mean, XML is a way to save

The confusion seems to be widespread. XML is of course a file format
(or rather metaformat), but it is particularly useful to store
plain-text file representations of objects. That's the philosophy
behind DOM (which defines a standard OO interface to XML documents),
and also XML-RPC. In the end it's just a difference of point of view;
files store data and objects store data!

> structured data as a _file_.  Python objects, on the other hand, are data
> structures in memory.  We would just be going back and forth between file and
> object using XML.


> So, where do we really need XML? Could the data just be a Python
> object? If we need to save the object, I think it can just be
> "pickled"?

Right, in principle. But there are advantages to using XML instead of
Python's pickling format, and these are the same advantages that XML
has compared to any other format: readability (plain ASCII) and
standard syntax. A Python pickle file looks like garbage in an editor,
and processing it without using Python requires significant effort.

There have been discussions of implementing a pickle-compatible
Python module that uses XML files. I don't know how far implementation
has progressed, but I definitely expect this to happen soon.

Konrad Hinsen                            | E-Mail: hinsen at cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-
Rue Charles Sadron                       | Fax:  +33-
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais

More information about the Pipet-Devel mailing list