FAQ

Message: 5
Date: Sun, 15 Mar 2009 10:56:22 +0100
From: Stefan Behnel <stefan_ml at behnel.de>
Subject: Re: [Tutor] Parse XML file
To: tutor at python.org
Message-ID: <gpijc7$6uo$1 at ger.gmane.org>
Content-Type: text/plain; charset=ISO-8859-1

Lukas Agrapidis wrote:
I am trying to parse an XML file using Python and found this resource
http://diveintopython.org/xml_processing/parsing_xml.html
You might be interested in ElementTree:

http://effbot.org/zone/element.htm

It's a lot easier to use than minidom, especially for new users. It's
available in the standard library as "xml.etree.ElementTree" module
since
Python 2.5.
I would agree - I was struggling with minidom, Stefan recommended
ElementTree and another person (deleted the email and can't recall his
name) recommended lxml. I was able to get a working understanding of
these libraries in less than an hour and solve the problems I had
encountered with minidom in a very short time. (BTW, parsing xml was
probably a poor choice for my first project while learning Python, but
then again, nobody has ever accused me of making my life easy)

Marc

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 4 | next ›
Discussion Overview
grouptutor @
categoriespython
postedMar 14, '09 at 10:30p
activeMar 15, '09 at 3:25p
posts4
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase