Python to XML to Python conversion

Terry Reedy tjreedy at udel.edu
Thu Jul 11 22:03:35 EDT 2002


"Mark" <markvkane at hotmail.com> wrote in message
news:d2f5f2d.0207111608.5f58aaf2 at posting.google.com...
> Hello,
>
> Recently my employer has asked me to do some computer work though
I'm
> just savvy enough to write minor programs of little significance.
My
> job is to write a program that will be generic enough to take any
form
> of Python dictionary and be able to convert it to XML and back.
> Ladies and gentlemen I am completely at a loss, I'm not a good
> programmer.  If anyone one has any good, simple and complicated
> examples, or tips I would be eternally greatful if you'd share them
> with me.  I have searched desperately through every posting I could
> find on the subject, but to no avail.  Please Help!

To make a start, I believe you need PyXML plus marshal or pickle
modules.  However, roundtripping *any* dict to text and back means
roundtripping *any* Python object to text and back.  I am sure that
this is not always possible.  You need sensible boundaries short of
*all* possible objects.  With that, I am sure there is existing and
available code that does such interconversions.

Terry J. Reedy








More information about the Python-list mailing list