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 is

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 ?xml version=1.0 ?BlahABCId id=1/DescriptionSomeText / DescriptionResultPassorFail/Result/ABC/Blah without spaces or new

Re: Convert raw data to XML

2007-01-30 Thread John Nagle
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, but what you want to do is parse XML and extract data from

Re: Convert raw data to XML

2007-01-30 Thread elrondrules
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.. That's straightforward. You confused people by asking the wrong question. You wrote Convert raw data to XML, but what you

Re: Convert raw data to XML

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

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 --

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

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 ?xml version=1.0 ?BlahABCId id=1/DescriptionSomeText / DescriptionResultPassorFail/Result/ABC/Blah without spaces or new lines. I need this to be written into an XML file as ?xml version=1.0 ? Blah

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 ?xml version=1.0 ?BlahABCId id=1/DescriptionSomeText / DescriptionResultPassorFail/Result/ABC/Blah without spaces or new lines. I need this to be written into an XML file as [same