[medusa] Looking for an XML to Python sequence source code

Andrew Kuchling akuchlin@m...
Thu, 3 May 2001 12:15:01 -0400

On Thu, May 03, 2001 at 03:35:26PM -0000, Weiss Blitz wrote:
>Does anyone knows of any Python code to convert from XML to a Python 
>sequence object? Like XML to a list?

The PyXML package includes an xml.marshal subpackage with a bunch of
different marshallers: a generic one, WDDX, and XML-RPC. For example:

>>> from xml.marshal import generic
>>> print generic.dumps( [1.0, pow(2, 75L), 'this is a string'] )
<?xml version="1.0"?><marshal><list id="i2"><float>1.0</float>
<long>37778931862957161709568</long><string>this is a string</string>