Javolution 6.0.0 java
javolution.xml.sax.Attributes Interface Reference
Inheritance diagram for javolution.xml.sax.Attributes:
[legend]

Public Member Functions

int getLength ()
 
CharArray getURI (int index)
 
CharArray getLocalName (int index)
 
CharArray getQName (int index)
 
CharArray getType (int index)
 
CharArray getValue (int index)
 
int getIndex (CharSequence uri, CharSequence localName)
 
int getIndex (CharSequence qName)
 
CharArray getType (CharSequence uri, CharSequence localName)
 
CharArray getType (CharSequence qName)
 
CharArray getValue (CharSequence uri, CharSequence localName)
 
CharArray getValue (CharSequence qName)
 

Detailed Description

This interface represents a list of XML attributes.

It is a more efficient version of org.xml.sax.Attributes with CharArray/CharSequence instead of the String to avoid forcing dynamic object allocations.

Author
David Megginson
Jean-Marie Dautelle
Version
4.0, June 16, 2006

Definition at line 27 of file Attributes.java.

Member Function Documentation

◆ getIndex() [1/2]

int javolution.xml.sax.Attributes.getIndex ( CharSequence  qName)

Looks up the index of an attribute by XML 1.0 qualified name (convenience method). This method returns the index of the attribute whose name has the same character content as the specified qName.

Parameters
qNamethe qualified (prefixed) name.
Returns
the index of the attribute, or -1 if it does not appear in the list.

Implemented in javolution.xml.internal.stream.AttributesImpl.

◆ getIndex() [2/2]

int javolution.xml.sax.Attributes.getIndex ( CharSequence  uri,
CharSequence  localName 
)

Looks up the index of an attribute by namespace name (convenience method). This method returns the index of the attribute whose uri/localName have the same character content as the specified uri/localName.

Parameters
urithe Namespace URI, or an empty character sequence if the name has no Namespace URI.
localNamethe attribute's local name.
Returns
the index of the attribute, or -1 if it does not appear in the list.

Implemented in javolution.xml.internal.stream.AttributesImpl.

◆ getLength()

int javolution.xml.sax.Attributes.getLength ( )

Returns the number of attributes in this list of attributes.

Returns
the number of attributes.

Implemented in javolution.xml.sax.SAX2ReaderImpl.Proxy, and javolution.xml.internal.stream.AttributesImpl.

Referenced by javolution.xml.sax.SAX2ReaderImpl.Proxy.getLength().

Here is the caller graph for this function:

◆ getLocalName()

CharArray javolution.xml.sax.Attributes.getLocalName ( int  index)

Looks up an attribute's local name by index.

Parameters
indexthe attribute index (zero-based).
Returns
the local name, or an empty character sequence if Namespace processing is not being performed, or null if the index is out of range.
See also
getLength

Implemented in javolution.xml.sax.SAX2ReaderImpl.Proxy, and javolution.xml.internal.stream.AttributesImpl.

Referenced by javolution.xml.sax.SAX2ReaderImpl.Proxy.getLocalName().

Here is the caller graph for this function:

◆ getQName()

CharArray javolution.xml.sax.Attributes.getQName ( int  index)

Looks up an attribute's XML 1.0 qualified name by index.

Parameters
indexthe attribute index (zero-based).
Returns
the XML 1.0 qualified name, or an empty character sequence if none is available, or null if the index is out of range.
See also
getLength

Implemented in javolution.xml.sax.SAX2ReaderImpl.Proxy, and javolution.xml.internal.stream.AttributesImpl.

Referenced by javolution.xml.sax.SAX2ReaderImpl.Proxy.getQName().

Here is the caller graph for this function:

◆ getType() [1/3]

CharArray javolution.xml.sax.Attributes.getType ( CharSequence  qName)

Looks up an attribute's type by XML 1.0 qualified name. This method returns the type of the attribute whose qName has the same character content as the specified qName.

Parameters
qNameThe XML 1.0 qualified name.
Returns
the attribute type as a string, or null if the attribute is not in the list or if qualified names are not available.

Implemented in javolution.xml.internal.stream.AttributesImpl.

◆ getType() [2/3]

CharArray javolution.xml.sax.Attributes.getType ( CharSequence  uri,
CharSequence  localName 
)

Looks up an attribute's type by Namespace name (convenience method). This method returns the type of the attribute whose uri/localName have the same character content as the specified uri/localName.

Parameters
urithe Namespace URI, or an empty string if the name has no Namespace URI.
localNamethe 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.

Implemented in javolution.xml.internal.stream.AttributesImpl.

◆ getType() [3/3]

CharArray javolution.xml.sax.Attributes.getType ( int  index)

Looks up an attribute's type by index.

The attribute type is one of the strings "CDATA", "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES", or "NOTATION" (always in upper case).

If the parser has not read a declaration for the attribute, or if the parser does not report attribute types, then it must return the value "CDATA" as stated in the XML 1.0 Recommentation (clause 3.3.3, "Attribute-TextBuilder Normalization").

For an enumerated attribute that is not a notation, the parser will report the type as "NMTOKEN".

Parameters
indexthe attribute index (zero-based).
Returns
the attribute's type as a string, or null if the index is out of range.
See also
getLength

Implemented in javolution.xml.sax.SAX2ReaderImpl.Proxy, and javolution.xml.internal.stream.AttributesImpl.

Referenced by javolution.xml.sax.SAX2ReaderImpl.Proxy.getType().

Here is the caller graph for this function:

◆ getURI()

CharArray javolution.xml.sax.Attributes.getURI ( int  index)

Looks up an attribute's Namespace URI by index.

Parameters
indexthe attribute index (zero-based).
Returns
the Namespace URI, or an empty character sequence if none is available, or null if the index is out of range.
See also
getLength

Implemented in javolution.xml.sax.SAX2ReaderImpl.Proxy, and javolution.xml.internal.stream.AttributesImpl.

Referenced by javolution.xml.sax.SAX2ReaderImpl.Proxy.getURI().

Here is the caller graph for this function:

◆ getValue() [1/3]

CharArray javolution.xml.sax.Attributes.getValue ( CharSequence  qName)

Looks up an attribute's value by XML 1.0 qualified name (convenience method). This method returns the value of the attribute whose qName has the same character content as the specified qName.

Parameters
qNameThe XML 1.0 qualified name.
Returns
the attribute value as a character sequence, or null if the attribute is not in the list or if qualified names are not available.

Implemented in javolution.xml.internal.stream.AttributesImpl.

◆ getValue() [2/3]

CharArray javolution.xml.sax.Attributes.getValue ( CharSequence  uri,
CharSequence  localName 
)

Looks up an attribute's value by Namespace name (convenience method). This method returns the value of the attribute whose uri/localName have the same character content as the specified uri/localName.

Parameters
urithe Namespace URI, or the empty string if the name has no Namespace URI.
localNamethe local name of the attribute.
Returns
the attribute value as a character sequence, or null if the attribute is not in the list.

Implemented in javolution.xml.internal.stream.AttributesImpl.

◆ getValue() [3/3]

CharArray javolution.xml.sax.Attributes.getValue ( int  index)

Looks up an attribute's value by index.

If the attribute value is a list of tokens (IDREFS, ENTITIES, or NMTOKENS), the tokens will be concatenated into a single string with each token separated by a single space.

Parameters
indexthe attribute index (zero-based).
Returns
the attribute's value as a character sequence, null if the index is out of range.
See also
getLength

Implemented in javolution.xml.sax.SAX2ReaderImpl.Proxy, and javolution.xml.internal.stream.AttributesImpl.

Referenced by javolution.xml.sax.SAX2ReaderImpl.Proxy.getValue().

Here is the caller graph for this function:

The documentation for this interface was generated from the following file: