Convert raw data to XML

elrondrules at elrondrules at
Tue Jan 30 03:42:07 CET 2007


I am running a HTTP server which receives post from a process.
In my do_POST method am receiving raw data.

I know that this raw data has a valid XML content and I need to 
convert this into an XML file.

Are there any routines to do this.. if not how to write one..

For example the raw data is as follows

<?xml version="1.0" ?><Blah><ABC><Id id="1"/><Description>SomeText </

without spaces or new lines. I need this to be written into an XML 
file as

<?xml version="1.0" ?>
              <Id id="1"/>

The tags in the raw data are not the same alaways.. Hence I need a 
generic routine that does the trick

Any pointers for this issue would help


More information about the Python-list mailing list