xml data or other?

Artie Ziff artie.ziff at gmail.com
Fri Nov 9 07:54:43 EST 2012


Hello,

I want to process XML-like data like this:

<testname=ltpacpi.sh>
	<description>
		ACPI (Advanced Control Power & Integration) testscript for 2.5 kernels.

	<\description>
	<test_location>
		ltp/testcases/kernel/device-drivers/acpi/ltpacpi.sh
	<\test_location>
<\testname>


After manually editing the data above, the python module 
xml.etree.ElementTree parses it without failing due to error in the data 
structure.

Edits were substituting '/' for '\' on the end tags, and adding the 
following structure:

<?xml version="1.0"?>
<data>
   <testname name=ltpacpi.sh>
     ...
   <\testname>
</data>


Is there a name for the format above (perhaps xhtml)?
I'd like to find a python module that can translate it to proper xml. 
Does one exist? etree?

Many thanks!
az




More information about the Python-list mailing list