org.apache.xml.serializer.utils
Class AttList
java.lang.Object
org.apache.xml.serializer.utils.AttList
- Attributes
public final class AttList
extends java.lang.Object
implements Attributes
Wraps a DOM attribute list in a SAX Attributes.
This class is a copy of the one in org.apache.xml.utils.
It exists to cut the serializers dependancy on that package.
A minor changes from that package are:
DOMHelper reference changed to DOM2Helper, class is not "public"
This class is not a public API, it is only public because it is
used in org.apache.xml.serializer.
int | getIndex(String qName) - Look up the index of an attribute by raw XML 1.0 name.
|
int | getIndex(String uri, String localPart) - Look up the index of an attribute by Namespace name.
|
int | getLength() - Get the number of attribute nodes in the list
|
String | getLocalName(int index) - Look up an attribute's local name by index.
|
String | getQName(int i) - Look up an attribute's qualified name by index.
|
String | getType(String name) - Get the attribute's node type by name
|
String | getType(String uri, String localName) - Look up an attribute's type by Namespace name.
|
String | getType(int i) - Get the attribute's node type by index
|
String | getURI(int index) - Look up an attribute's Namespace URI by index.
|
String | getValue(String name) - Look up an attribute's value by name.
|
String | getValue(String uri, String localName) - Look up an attribute's value by Namespace name.
|
String | getValue(int i) - Get the attribute's node value by index
|
AttList
public AttList(NamedNodeMap attrs,
DOM2Helper dh)
Constructor AttList
attrs
- List of attributes this will containdh
- DOMHelper
getIndex
public int getIndex(String qName)
Look up the index of an attribute by raw XML 1.0 name.
qName
- The qualified (prefixed) name.
- The index of the attribute, or -1 if it does not
appear in the list.
getIndex
public int getIndex(String uri,
String localPart)
Look up the index of an attribute by Namespace name.
uri
- The Namespace URI, or the empty string if
the name has no Namespace URI.localPart
- The attribute's local name.
- 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
- number of attribute nodes
getLocalName
public String getLocalName(int index)
Look up an attribute's local name by index.
index
- The attribute index (zero-based).
- 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.
i
- The attribute index (zero-based).
- The attribute's qualified name
getType
public String getType(String name)
Get the attribute's node type by name
- the attribute's node type
getType
public String getType(String uri,
String localName)
Look up an attribute's type by Namespace name.
uri
- The Namespace URI, or the empty String if the
name has no Namespace URI.localName
- The local name of the attribute.
- The attribute type as a string, or null if the
attribute is not in the list or if Namespace
processing is not being performed.
getType
public String getType(int i)
Get the attribute's node type by index
i
- The attribute index (zero-based)
- the attribute's node type
getURI
public String getURI(int index)
Look up an attribute's Namespace URI by index.
index
- The attribute index (zero-based).
- The Namespace URI, or the empty string if none
is available, or null if the index is out of
range.
getValue
public String getValue(String name)
Look up an attribute's value by name.
name
- The attribute node's name
- The attribute node's value
getValue
public String getValue(String uri,
String localName)
Look up an attribute's value by Namespace name.
uri
- The Namespace URI, or the empty String if the
name has no Namespace URI.localName
- The local name of the attribute.
- The attribute value as a string, or null if the
attribute is not in the list.
getValue
public String getValue(int i)
Get the attribute's node value by index
i
- The attribute index (zero-based)
- the attribute's node value
Copyright © 2006 Apache XML Project. All Rights Reserved.