|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for a list of XML attributes.
This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.
This interface allows access to a list of attributes in three different ways:
The list will not contain attributes that were declared #IMPLIED but not specified in the start tag. It will also not contain attributes used as Namespace declarations (xmlns*) unless the http://xml.org/sax/features/raw-names feature is set to true (it is false by default).
If the raw-names feature is false, access by raw XML 1.0 may not be available; if the http://xml.org/sax/features/namespaces feature is false, access by Namespace-qualified names may not be available.
This interface replaces the now-deprecated SAX1 AttributeList interface, which does not contain Namespace support. In addition to Namespace support, it adds the getIndex methods.
The order of attributes in the list is random.
AttributeListImpl
Method Summary | |
int |
getIndex(java.lang.String rawName)
Look up the index of an attribute by raw XML 1.0 name. |
int |
getIndex(java.lang.String uri,
java.lang.String localPart)
Look up the index of an attribute by Namespace name. |
int |
getLength()
Return the number of attributes in the list. |
java.lang.String |
getLocalName(int index)
Look up an attribute's local name by index. |
java.lang.String |
getRawName(int index)
Look up an attribute's raw XML 1.0 name by index. |
java.lang.String |
getType(int index)
Look up an attribute's type by index. |
java.lang.String |
getType(java.lang.String rawName)
Look up an attribute's type by raw XML 1.0 name. |
java.lang.String |
getType(java.lang.String uri,
java.lang.String localName)
Look up an attribute's type by Namespace name. |
java.lang.String |
getURI(int index)
Look up an attribute's Namespace URI by index. |
java.lang.String |
getValue(int index)
Look up an attribute's value by index. |
java.lang.String |
getValue(java.lang.String rawName)
Look up an attribute's value by raw XML 1.0 name. |
java.lang.String |
getValue(java.lang.String uri,
java.lang.String localName)
Look up an attribute's value by Namespace name. |
Method Detail |
public int getLength()
public java.lang.String getURI(int index)
index
- The attribute index (zero-based).public java.lang.String getLocalName(int index)
index
- The attribute index (zero-based).public java.lang.String getRawName(int index)
index
- The attribute index (zero-based).public java.lang.String getType(int index)
index
- The attribute index (zero-based).public java.lang.String getValue(int index)
index
- The attribute index (zero-based).public int getIndex(java.lang.String uri, java.lang.String localPart)
uri
- The Namespace URI, or the empty string if
the name has no Namespace URI.localName
- The attribute's local name.public int getIndex(java.lang.String rawName)
rawName
- The raw (prefixed) name.public java.lang.String getType(java.lang.String uri, java.lang.String localName)
uri
- The Namespace URI, or the empty String if the
name has no Namespace URI.localName
- The local name of the attribute.public java.lang.String getType(java.lang.String rawName)
rawName
- The raw XML 1.0 name.public java.lang.String getValue(java.lang.String uri, java.lang.String localName)
uri
- The Namespace URI, or the empty String if the
name has no Namespace URI.localName
- The local name of the attribute.public java.lang.String getValue(java.lang.String rawName)
rawName
- The raw XML 1.0 name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |