5 Nov
2008
5 Nov
'08
3:12 p.m.
Asiri Rathnayake wrote:
Isn't there a hasAttribute(attributeName) method? Just asking because this method exists in the DOM Level 2 Core specification. See http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-ElHasAttr
It's not available in org.w3c.dom.Node but org.w3c.dom.Element (which extends Node) contains that method. I don't see a way to use Element instead of Node because Element doesn't seem to have a getChildElements() method.
If Element extends Node, then it inherits all its methods, including getChildElements. -- Sergiu Dumitriu http://purl.org/net/sergiu/