[From nobody Fri Feb 10 19:20:18 2006 Date: Mon, 1 Mar 1999 10:55:37 +0100 Subject: Re: [Pipet Devel] and still more infrastructure things > 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. Right. > 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. -- ------------------------------------------------------------------------------- Konrad Hinsen | E-Mail: hinsen@cnrs-orleans.fr Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.55.69 Rue Charles Sadron | Fax: +33-2.38.63.15.17 45071 Orleans Cedex 2 | Deutsch/Esperanto/English/ France | Nederlands/Francais ------------------------------------------------------------------------------- ]