- From: Martin Honnen <Martin.Honnen@sector27.de>
- Date: Sat, 9 Jan 1999 13:52:15 -0500 (EST)
- To: www-dom@w3.org
http://www.w3.org/TR/WD-DOM-Level-2/filters-and-iterators.html
contains the following example supposed to filter out named anchors in an HTML
document:
class NamedAnchorFilter implements NodeFilter
{
boolean acceptNode(Node n) {
if (n instanceof Element) {
Element e = n;
if (n.getAttribute("NAME") != NULL) {
return true;
}
}
return false;
}
}
Shouldn't that be
n instanceof HTMLAnchorElement
to do what it is supposed to do??
--
Martin Honnen
Email: mailto:Martin.Honnen@sector27.de
WWW : http://www.sector27.de/martin.honnen/
Received on Monday, 11 January 1999 13:08:11 UTC