W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

Re: Walking the DOM (was: XML APIs)

From: John Cowan <cowan@locke.ccil.org>
Date: Fri, 13 Nov 1998 11:53:30 -0500
Message-ID: <364C640A.189B799@locke.ccil.org>
To: DOM List <www-dom@w3.org>
Miles Sabin wrote:

> (run through the iterators and remove corresponding elements
>  with duplicated foo attributes ... OK, a bit artificial I
>  know, but I'm sure someone can come up with a more
>  realistic case).
> Even with a remove() operation on the iterator class, this
> will still cause serious problems, because i will be
> invalidated every time a node is removed via j.

Agreed.  But other solutions are hardly better, since they
involve using remove operations with at best O(log n) behavior.

1) You can't win;

2) You can't even break even.

John Cowan	http://www.ccil.org/~cowan		cowan@ccil.org
	You tollerday donsk?  N.  You tolkatiff scowegian?  Nn.
	You spigotty anglease?  Nnn.  You phonio saxo?  Nnnn.
		Clear all so!  'Tis a Jute.... (Finnegans Wake 16.5)
Received on Friday, 13 November 1998 11:51:40 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:05 UTC