Using xmllib

Pieter Claerhout PClaerhout at CREO.BE
Wed Apr 12 07:38:41 EDT 2000


does anyone has an example on how to use the xmllib to parse an xmlfile?
I have an xml-file, which looks a bit like this:

<!-- a general comment -->
    <GENERAL PATH="S:\" />
    <ITEM NAME="Item1">
        <DESCRIPTION>Item 1 description.</DESCRIPTION>
        <DATE>Thu Dec 16 16:35:05 1999</DATE>
    <ITEM NAME="Item2">
        <DESCRIPTION>Item 2 description.</DESCRIPTION>
        <DATE>Wed Mar 15 11:54:27 2000</DATE>

I want to convert it to something like this:

Collection from path s:\

- Item 1 (Thu Dec 16 16:35:05 1999)
  Item 1 description.
- Item 2 (Wed Mar 15 11:54:27 2000)
  Item 2 description.

Anyone an idea on how to do that with XMLlib?

Kind regards,

Pieter_Claerhout at

More information about the Python-list mailing list