4DOM TreeWalker

Kevin Russell krussell4 at videon.home.com
Sun May 14 13:08:06 EDT 2000


Mark Nottingham wrote:

> Just stumbled across the Fourthought stuff (wow!). I've been wanting to use
> a DOM treewalker for a certain project for a while, instead of building my
> own object tree through SAX. However, I don't have any experience with DOM,
> and haven't found any good examples.
>
> Does anyone have an example of a TreeWalker implementation, preferably in
> Python? Even just some dummy code that would allow me to walk down the tree
> according to my own logic would be very helpful.
>
> Thanks,
>
> --
> Mark Nottingham
> http://www.mnot.net/

There's a DOM-walker implementation in the XML-SIG's distribution,
which you should already have if you've gotten 4DOM to work.
Look for walker.py in the dom subdirectory.

A year ago I posted some toy examples of how to use it on the XML-SIG
mailing list:

    http://www.python.org/pipermail/xml-sig/1999-February/002546.html

Read the whole thread, since the follow-ups on suggest important
improvements.

-- Kevin






More information about the Python-list mailing list