Attr nodes in DOM

Dave Halls daveh at
Thu Nov 19 15:03:30 GMT 1998

Ronald Bourret wrote:

> How do I get all the attributes of an element in DOM?
> The third paragraph in the Element interface states that, "...since the
> Element interface inherits from Node, the generic Node interface method
> getAttributes may be used to retrieve the set of all attributes for an
> element."  Unfortunately, the description of the Node interface lists no
> such method.
> Is this what the attributes property of Node is for?

from the javadoc (with DOMSDK anyway)...

Interface org.w3c.dom.Node


public NamedNodeMap getAttributes()

       A NamedNodeMap containing the attributes of this node (if it is an
Element) or null otherwise.

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list