The Attribute Class
The Attribute class, shown in Example 15.10, represents an attribute of an element other than one that declares a namespace. Each attribute has these five basic properties:
Local Name
A String accessible through the setName() and getName() methods.
Namespace
A Namespace object that encapsulates both the namespace URI and the prefix. This is accessible through the setNamespace() and getNamespace() methods. For all unprefixed attributes, this is Namespace.NO_NAMESPACE. The prefix, URI, and fully qualified name are separately readable through the getNamespaceURI(), getNamespacePrefix(), and getQualifiedName() convenience methods.
Value
A String that contains the attribute's normalized value. This is accessible through the getValue() ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access