| Package | Description | 
|---|---|
| org.w3c.dom | Provides the interfaces for the Document Object Model (DOM). | 
| Modifier and Type | Method and Description | 
|---|---|
| Attr | Document. createAttribute(String name)Creates an  Attrof the given name. | 
| Attr | Document. createAttributeNS(String namespaceURI,
                 String qualifiedName)Creates an attribute of the given qualified name and namespace URI. | 
| Attr | Element. getAttributeNode(String name)Retrieves an attribute node by name. | 
| Attr | Element. getAttributeNodeNS(String namespaceURI,
                  String localName)Retrieves an  Attrnode by local name and namespace URI. | 
| Attr | Element. removeAttributeNode(Attr oldAttr)Removes the specified attribute node. | 
| Attr | Element. setAttributeNode(Attr newAttr)Adds a new attribute node. | 
| Attr | Element. setAttributeNodeNS(Attr newAttr)Adds a new attribute. | 
| Modifier and Type | Method and Description | 
|---|---|
| Attr | Element. removeAttributeNode(Attr oldAttr)Removes the specified attribute node. | 
| Attr | Element. setAttributeNode(Attr newAttr)Adds a new attribute node. | 
| Attr | Element. setAttributeNodeNS(Attr newAttr)Adds a new attribute. | 
| void | Element. setIdAttributeNode(Attr idAttr,
                  boolean isId)If the parameter  isIdistrue, this method
 declares the specified attribute to be a user-determined ID attribute
 . | 
 Submit a bug or feature
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
 Copyright © 2005, 2025, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.