Parsing XML (simple)

John J. Lee jjl at pobox.com
Mon Oct 15 15:15:07 EDT 2001


On 15 Oct 2001, Martin von Loewis wrote:

> singleton at skynet.be (Thomas Singleton) writes:
>
> > <commands>
> > 	<command>commande1</command>
> > 	<command>commande2</command>
> > </commands>
> [...]
> > After reading the modules doc and a few usenet posts, i have written a
> > small python program to echo the values contained between tags, but
> > i'm having troubles with the commands, only the FIRST one is echoed.

Martin fixed your problem, but since I've read in several different places
that 'there are two apis for dealing with XML in Python', I thought I'd
point out the third, XPath, an implementation of which is available in
4Suite.  Simpler to use (for my simple purposes, at least), but slower, I
expect.


John




More information about the Python-list mailing list