Package org.apache.xml.utils
Class AttList
java.lang.Object
org.apache.xml.utils.AttList
- All Implemented Interfaces:
Attributes
Wraps a DOM attribute list in a SAX Attributes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Look up the index of an attribute by raw XML 1.0 name.int
Look up the index of an attribute by Namespace name.int
Get the number of attribute nodes in the listgetLocalName
(int index) Look up an attribute's local name by index.getQName
(int i) Look up an attribute's qualified name by index.getType
(int i) Get the attribute's node type by indexGet the attribute's node type by nameLook up an attribute's type by Namespace name.getURI
(int index) Look up an attribute's Namespace URI by index.getValue
(int i) Get the attribute's node value by indexLook up an attribute's value by name.Look up an attribute's value by Namespace name.
-
Constructor Details
-
AttList
Constructor AttList- Parameters:
attrs
- List of attributes this will containdh
- DOMHelper
-
-
Method Details
-
getLength
public int getLength()Get the number of attribute nodes in the list- Specified by:
getLength
in interfaceAttributes
- Returns:
- number of attribute nodes
-
getURI
Look up an attribute's Namespace URI by index.- Specified by:
getURI
in interfaceAttributes
- Parameters:
index
- The attribute index (zero-based).- Returns:
- The Namespace URI, or the empty string if none is available, or null if the index is out of range.
-
getLocalName
Look up an attribute's local name by index.- Specified by:
getLocalName
in interfaceAttributes
- Parameters:
index
- The attribute index (zero-based).- Returns:
- The local name, or the empty string if Namespace processing is not being performed, or null if the index is out of range.
-
getQName
Look up an attribute's qualified name by index.- Specified by:
getQName
in interfaceAttributes
- Parameters:
i
- The attribute index (zero-based).- Returns:
- The attribute's qualified name
-
getType
Get the attribute's node type by index- Specified by:
getType
in interfaceAttributes
- Parameters:
i
- The attribute index (zero-based)- Returns:
- the attribute's node type
-
getValue
Get the attribute's node value by index- Specified by:
getValue
in interfaceAttributes
- Parameters:
i
- The attribute index (zero-based)- Returns:
- the attribute's node value
-
getType
Get the attribute's node type by name- Specified by:
getType
in interfaceAttributes
- Parameters:
name
- Attribute name- Returns:
- the attribute's node type
-
getType
Look up an attribute's type by Namespace name.- Specified by:
getType
in interfaceAttributes
- Parameters:
uri
- The Namespace URI, or the empty String if the name has no Namespace URI.localName
- The local name of the attribute.- Returns:
- The attribute type as a string, or null if the attribute is not in the list or if Namespace processing is not being performed.
-
getValue
Look up an attribute's value by name.- Specified by:
getValue
in interfaceAttributes
- Parameters:
name
- The attribute node's name- Returns:
- The attribute node's value
-
getValue
Look up an attribute's value by Namespace name.- Specified by:
getValue
in interfaceAttributes
- Parameters:
uri
- The Namespace URI, or the empty String if the name has no Namespace URI.localName
- The local name of the attribute.- Returns:
- The attribute value as a string, or null if the attribute is not in the list.
-
getIndex
Look up the index of an attribute by Namespace name.- Specified by:
getIndex
in interfaceAttributes
- Parameters:
uri
- The Namespace URI, or the empty string if the name has no Namespace URI.localPart
- The attribute's local name.- Returns:
- The index of the attribute, or -1 if it does not appear in the list.
-
getIndex
Look up the index of an attribute by raw XML 1.0 name.- Specified by:
getIndex
in interfaceAttributes
- Parameters:
qName
- The qualified (prefixed) name.- Returns:
- The index of the attribute, or -1 if it does not appear in the list.
-