Package org.apache.xml.utils
Class AttList
java.lang.Object
org.apache.xml.utils.AttList
- All Implemented Interfaces:
Attributes
public class AttList extends Object implements Attributes
Wraps a DOM attribute list in a SAX Attributes.
-
Constructor Summary
Constructors Constructor Description AttList(NamedNodeMap attrs, DOMHelper dh)Constructor AttList -
Method Summary
Modifier and Type Method Description intgetIndex(String qName)Look up the index of an attribute by raw XML 1.0 name.intgetIndex(String uri, String localPart)Look up the index of an attribute by Namespace name.intgetLength()Get the number of attribute nodes in the listStringgetLocalName(int index)Look up an attribute's local name by index.StringgetQName(int i)Look up an attribute's qualified name by index.StringgetType(int i)Get the attribute's node type by indexStringgetType(String name)Get the attribute's node type by nameStringgetType(String uri, String localName)Look up an attribute's type by Namespace name.StringgetURI(int index)Look up an attribute's Namespace URI by index.StringgetValue(int i)Get the attribute's node value by indexStringgetValue(String name)Look up an attribute's value by name.StringgetValue(String uri, String localName)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:
getLengthin interfaceAttributes- Returns:
- number of attribute nodes
- See Also:
Attributes.getURI(int),Attributes.getLocalName(int),Attributes.getQName(int),Attributes.getType(int),Attributes.getValue(int)
-
getURI
Look up an attribute's Namespace URI by index.- Specified by:
getURIin 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.
- See Also:
Attributes.getLength()
-
getLocalName
Look up an attribute's local name by index.- Specified by:
getLocalNamein 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.
- See Also:
Attributes.getLength()
-
getQName
Look up an attribute's qualified name by index.- Specified by:
getQNamein interfaceAttributes- Parameters:
i- The attribute index (zero-based).- Returns:
- The attribute's qualified name
- See Also:
Attributes.getLength()
-
getType
Get the attribute's node type by index- Specified by:
getTypein interfaceAttributes- Parameters:
i- The attribute index (zero-based)- Returns:
- the attribute's node type
- See Also:
Attributes.getLength()
-
getValue
Get the attribute's node value by index- Specified by:
getValuein interfaceAttributes- Parameters:
i- The attribute index (zero-based)- Returns:
- the attribute's node value
- See Also:
Attributes.getLength()
-
getType
Get the attribute's node type by name- Specified by:
getTypein interfaceAttributes- Parameters:
name- Attribute name- Returns:
- the attribute's node type
-
getType
Look up an attribute's type by Namespace name.- Specified by:
getTypein 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:
getValuein 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:
getValuein 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:
getIndexin 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:
getIndexin interfaceAttributes- Parameters:
qName- The qualified (prefixed) name.- Returns:
- The index of the attribute, or -1 if it does not appear in the list.
-