xml data or other?

rusi rustompmody at gmail.com
Fri Nov 9 14:50:15 CET 2012

On Nov 9, 5:54 pm, Artie Ziff <artie.z... at gmail.com> wrote:
> Hello,
> I want to process XML-like data like this:
> Edits were substituting '/' for '\' on the end tags, and adding the
> following structure:

If thats all you want, you can try the following:

# obviously this should come from a file
input= """<testname=ltpacpi.sh>
                ACPI (Advanced Control Power & Integration) testscript
for 2.5 kernels.


prefix = """<?xml version="1.0"?>

postfix = """</data>"""

correctedInput = prefix + input.replace("\\", "/") + postfix
# submit correctedinput to etree

More information about the Python-list mailing list