Fredrik Lundh wrote:
> here's one way to do it:
>
> import cElementTree as ET
>
> tree = ET.XML("""
>
> ball
>
> red
> large
>
>
> """)
>
> MAP = {
> "object": ("dl", "object"),
> "name": ("dt", "name"
Frederick,
I didn't know about cElementTree before, wow - this is a lot nicer than
PyyXML - and a whole lot faster. Almost makes my comments about
dealing with the xml as text, completely pointless.
--
http://mail.python.org/mailman/listinfo/python-list
are you using PyXML?
If this is a simple one to one relationship with dependence on order,
I'd forgo the whole PyXML, read the file line by line, and replace tags
as appropriate. You may have to do some simple checkin, in case there
is n object
Otherwise, have fun with the parsers - nothing is
Ron Adam wrote:
> I have an element tree structure of nested elements that I want to
> convert to html as nested definition and unordered lists in the
> following way.
>
>
> ball
>
>red
>large
>
>
>
>
> To...
>
>
> ball
>