W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2002

Node.isEqualNode

From: Zeljko VELAJA <zvelaja@visualfriendly.com>
Date: Tue, 7 May 2002 12:10:07 +0200
To: <www-dom@w3.org>
Message-ID: <000101c1f5af$5df12050$2e00000a@visual.com>
First of all as a newcommer to this list I'd like to send my greetings to
all its members.

Now I can ask my question :

DOM Level 3 introduces the method isEqualNode(in Node arg, in boolean deep).

I do not understand the use of the boolean argument deep : "if true,
recursively compare the subtrees; if false, compare only the nodes
themselves".  Now a little before in the specifications it's said that two
nodes are equal is the "childNodes NodeLists are equal. This is : they are
both null, or they have the same length and contain equal nodes at the same
index".

Now how can I test the equality of two child nodes without recursively
calling isEqualNode ? So as I understand it it does not matter if deep is
true or false, the general contract requires that recursion be done. What's
your opinion about this topic ?

Zeljko VELAJA
Received on Tuesday, 7 May 2002 06:10:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:56 GMT