XML Tree Discovery (script, tool, __?)

uche.ogbuji at gmail.com uche.ogbuji at gmail.com
Wed Oct 26 19:28:27 CEST 2005


"""
The output I was contemplating was a DOM "DNA" - that is the DOM
without the instances of the elements or their data, a bare tree, a
prototype tree based on what is in the document (rather than what is
legal to include in the document).

Just enough data that for an arbitrary element I would know:

1) whether the element was in a document
2) where to find it (the chain of parents)
"""

This is easy to do in SAX.  For some hints, see page 2 of my article:

http://www.xml.com/pub/a/2004/11/24/py-xml.html

--
 Uche Ogbuji                               Fourthought, Inc.
http://uche.ogbuji.net                    http://fourthought.com
http://copia.ogbuji.net                   http://4Suite.org
Articles: http://uche.ogbuji.net/tech/publications/




More information about the Python-list mailing list