example error??

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