[XML-SIG] DOM walker class
Sat, 28 Nov 1998 17:32:07 -0500
A.M. Kuchling wrote:
> However, this change really makes the distinction between walk() and
> walk1() unnecessary. walk() is basically there as a wrapper for
> walk1(), to get the root element if it's a Document node; if we just
> traverse all the children, this is consistent for any node type so
> walk() and walk1() could be collapsed into one function. This will
> break code that subclasses Walker and overrides walk() or walk1() with
> something customized.
> What do people think should be done? Just fix walk(), or merge walk()
> and walk1()?
I think they should be merged. The current solution also does not allow you to
print comments, doc types, or anything else outside of the root element....
If you are worried about breaking customizations on this interface, you could
define walk1 and just have it call walk until everyone gets thier code
> A.M. Kuchling http://starship.skyport.net/crew/amk/
> May you go safe, my friend, across that dizzy way / No wider than a hair, by
> which your people go / From earth to Paradise; may you go safe today / With
> stars and space above, and time and stars below.
> -- Lord Dunsany
> XML-SIG maillist - XML-SIG@python.org