org.objectweb.proactive.core.xml.io
Interface Attributes

All Known Implementing Classes:
DefaultHandlerAdapter.AttributesImpl, DefaultHandlerAdapter.EmptyAttributesImpl, DOMAdaptor.EmptyAttributesImpl

public interface Attributes

A class implementing this interface is a wrapper of the attribute of an XML element. It is used to wrap both SAX and DOM attributes in an independant manner.

Version:
0.91
Author:
Lionel Mestre

Method Summary
 int getLength()
          Returns the number of attributes in the list.
 java.lang.String getValue(int index)
          Looks up an attribute's value by index.
 java.lang.String getValue(java.lang.String qName)
          Looks up an attribute's value by XML 1.0 qualified name.
 java.lang.String getValue(java.lang.String uri, java.lang.String localPart)
          Looks up the index of an attribute by Namespace name.
 

Method Detail

getValue

public java.lang.String getValue(int index)
Looks up an attribute's value by index.

Parameters:
index - The attribute index (zero-based).
Returns:
The attribute's value as a string, or null if the index is out of range.

getValue

public java.lang.String getValue(java.lang.String qName)
Looks up an attribute's value by XML 1.0 qualified name.

Parameters:
qName - The qualified (prefixed) name.
Returns:
The attribute value as a string, or null if the attribute is not in the list or if qualified names are not available.

getValue

public java.lang.String getValue(java.lang.String uri,
                                 java.lang.String localPart)
Looks 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.
Returns:
The attribute value as a string, or null if the attribute is not in the list.

getLength

public int getLength()
Returns the number of attributes in the list.



Copyright © April 2004 INRIA All Rights Reserved.