Convert raw data to XML

elrondrules at gmail.com elrondrules at gmail.com
Tue Jan 30 14:07:39 EST 2007


On Jan 29, 8:54 pm, "Gabriel Genellina" <gagsl... at yahoo.com.ar> wrote:
> En Mon, 29 Jan 2007 23:42:07 -0300, <elrondru... at gmail.com> escribió:
>
> > For example the raw data is as follows
>
> > <?xml version="1.0" ?><Blah><ABC><Id id="1"/><Description>SomeText </
> > Description><Result>PassorFail</Result></ABC></Blah>
>
> > without spaces or new lines. I need this to be written into an XML
> > file as
> > [same content but nicely indented]
>
> Is the file supposed to be processed by humans? If not, just write it as  
> you receive it.
> Spaces and newlines and indentation are mostly irrelevant on an xml file.
>
> --
> Gabriel Genellina

the reason I wanted to write it as a file was to parse the file, look 
for a specific attribute and execute a set of commands based on the 
value of the attribute.. also i needed to display the output of the 
http post in a more readable format..





More information about the Python-list mailing list