org.apache.xml.utils

Class AttList

public class AttList extends Object implements Attributes

Wraps a DOM attribute list in a SAX Attributes.

UNKNOWN: internal

Constructor Summary
AttList(NamedNodeMap attrs, DOMHelper dh)
Constructor AttList
Method Summary
intgetIndex(String uri, String localPart)
Look up the index of an attribute by Namespace name.
intgetIndex(String qName)
Look up the index of an attribute by raw XML 1.0 name.
intgetLength()
Get the number of attribute nodes in the list
StringgetLocalName(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 index
StringgetType(String name)
Get the attribute's node type by name
StringgetType(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 index
StringgetValue(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 Detail

AttList

public AttList(NamedNodeMap attrs, DOMHelper dh)
Constructor AttList

Parameters: attrs List of attributes this will contain dh DOMHelper

Method Detail

getIndex

public int getIndex(String uri, String localPart)
Look up the index of an attribute by Namespace name.

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

public int getIndex(String qName)
Look up the index of an attribute by raw XML 1.0 name.

Parameters: qName The qualified (prefixed) name.

Returns: The index of the attribute, or -1 if it does not appear in the list.

getLength

public int getLength()
Get the number of attribute nodes in the list

Returns: number of attribute nodes

getLocalName

public String getLocalName(int index)
Look up an attribute's local name by index.

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

public String getQName(int i)
Look up an attribute's qualified name by index.

Parameters: i The attribute index (zero-based).

Returns: The attribute's qualified name

getType

public String getType(int i)
Get the attribute's node type by index

Parameters: i The attribute index (zero-based)

Returns: the attribute's node type

getType

public String getType(String name)
Get the attribute's node type by name

Parameters: name Attribute name

Returns: the attribute's node type

getType

public String getType(String uri, String localName)
Look up an attribute's type by Namespace name.

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.

getURI

public String getURI(int index)
Look up an attribute's Namespace URI by index.

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.

getValue

public String getValue(int i)
Get the attribute's node value by index

Parameters: i The attribute index (zero-based)

Returns: the attribute's node value

getValue

public String getValue(String name)
Look up an attribute's value by name.

Parameters: name The attribute node's name

Returns: The attribute node's value

getValue

public String getValue(String uri, String localName)
Look up an attribute's value by Namespace name.

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.

Copyright B) 2006 Apache XML Project. All Rights Reserved.