Message from discussion
xml data or other?
Received: by 10.14.209.66 with SMTP id r42mr15315677eeo.1.1353486367984;
Wed, 21 Nov 2012 00:26:07 -0800 (PST)
Path: q13ni3641wii.0!nntp.google.com!feeder1.cambriumusenet.nl!feeder2.cambriumusenet.nl!feed.tweaknews.nl!216.40.29.245.MISMATCH!novia!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path: <shivers.p...@yahoo.co.uk>
X-Original-To: python-l...@python.org
Delivered-To: python-l...@mail.python.org
X-Spam-Status: OK 0.004
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'failing': 0.05; 'python':
0.09; 'friday,': 0.09; 'subject:xml': 0.09;
'to:addr:comp.lang.python': 0.09; 'xml.': 0.09; 'cc:addr:python-
list': 0.10; "'/'": 0.16; 'integration)': 0.16; 'structure.':
0.16; 'substituting': 0.16; 'utc,': 0.16; 'wrote:': 0.17;
'module': 0.19; 'translate': 0.20; "i'd": 0.22; 'cc:2**0': 0.23;
'this:': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org':
0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26;
'thanks!': 0.26; '(perhaps': 0.29; 'subject:other': 0.29; 'maybe':
0.29; 'error': 0.30; 'from:addr:yahoo.co.uk': 0.32;
'subject:data': 0.33; 'received:google.com': 0.34; 'list': 0.35;
'subject:?': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'tool':
0.36; 'xml': 0.37; 'does': 0.37; 'received:209': 0.37; 'data':
0.37; 'subject:: ': 0.38; 'hello,': 0.39; 'end': 0.40; 'from:no
real name:2**0': 0.60; 'due': 0.66; 'power': 0.74; 'url:info':
0.75; 'tags,': 0.81
Newsgroups: comp.lang.python
Date: Tue, 13 Nov 2012 06:05:49 -0800 (PST)
In-Reply-To: <mailman.3490.1352465695.27098.python-list@python.org>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=86.140.196.73;
posting-account=nSw5nwoAAAADJU-tMQhuoJM39o7Cbt4k
References: <mailman.3490.1352465695.27098.python-list@python.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Subject: Re: xml data or other?
From: shivers.p...@yahoo.co.uk
To: comp.lang.python@googlegroups.com
Cc: python-l...@python.org
X-BeenThere: python-l...@python.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <http://mail.python.org/mailman/options/python-list>,
<mailto:python-list-requ...@python.org?subject=unsubscribe>
List-Archive: <http://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-l...@python.org>
List-Help: <mailto:python-list-requ...@python.org?subject=help>
List-Subscribe: <http://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-requ...@python.org?subject=subscribe>
Message-ID: <mailman.3627.1352815553.27098.python-l...@python.org>
Lines: 74
NNTP-Posting-Host: 2001:888:2000:d::a6
X-Trace: 1352815553 news.xs4all.nl 6972 [2001:888:2000:d::a6]:39822
X-Complaints-To: ab...@xs4all.nl
Bytes: 4058
Content-Type: text/plain; charset=ISO-8859-1
On Friday, November 9, 2012 12:54:56 PM UTC, Artie Ziff wrote:
> 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
maybe an xml tool would be better, a good list of xml tools here; http://www.xml-data.info