Re: Convert raw data to XML

2007-01-30 Thread Gabriel Genellina
[EMAIL PROTECTED] wrote: > is there any other way to do this without using BeautifulStoneSoup.. > using existing minidom or ext.. > i dont want to install anything new It appears that you already know the answer... Look at the minidom documentation, toprettyxml method. -- Gabriel Genellina -

Re: Convert raw data to XML

2007-01-30 Thread hg
ost in a more readable format.. >> >> That's straightforward. You confused people by asking the >> wrong question. You wrote "Convert raw data to XML", but what >> you want to do is parse XML and extract data from it. >> >> This will do what

Re: Convert raw data to XML

2007-01-30 Thread elrondrules
orward. You confused people by asking the > wrong question. You wrote "Convert raw data to XML", but what > you want to do is parse XML and extract data from it. > > This will do what you want: > >http://www.crummy.com/software/BeautifulSoup/ > > For st

Re: Convert raw data to XML

2007-01-30 Thread John Nagle
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.. That's straightforward. You confused people by asking the wrong question. You wrote "Convert raw data to XML"

Re: Convert raw data to XML

2007-01-30 Thread elrondrules
On Jan 29, 8:54 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Mon, 29 Jan 2007 23:42:07 -0300, <[EMAIL PROTECTED]> escribió: > > > For example the raw data is as follows > > > SomeText > Description>PassorFail > > > without spaces or new lines. I need this to be written into an XML > > f

Re: Convert raw data to XML

2007-01-30 Thread John Nagle
Actually, that's not "raw data" coming in, that's valid XML. Why do you need to indent it? Just write it to a file. If you really need to indent XML, get BeautifulSoup, read the XML in with BeautifulStoneSoup, and write it back out with "prettify()". But if the next thing to see that XML

Re: Convert raw data to XML

2007-01-29 Thread Gabriel Genellina
En Mon, 29 Jan 2007 23:42:07 -0300, <[EMAIL PROTECTED]> escribió: > For example the raw data is as follows > > SomeText Description>PassorFail > > 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 processe

Re: Convert raw data to XML

2007-01-29 Thread Justin Ezequiel
On Jan 30, 10:42 am, [EMAIL PROTECTED] wrote: > For example the raw data is as follows > > SomeText Description>PassorFail > > without spaces or new lines. I need this to be written into an XML > file as > > > > > > > SomeText >

Convert raw data to XML

2007-01-29 Thread elrondrules
Hi 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