com.thaiopensource.pullax
Interface XmlContentItem
- All Superinterfaces:
- XmlItem
- public interface XmlContentItem
- extends XmlItem
| Fields inherited from interface com.thaiopensource.pullax.XmlItem |
ATTRIBUTE, BUILTIN_ENTITY_REFERENCE, CDATA_SECTION, CHARACTER_REFERENCE, COMMENT, DOCUMENT_TYPE, EMPTY_ELEMENT, END_ELEMENT, END_ENTITY, PROCESSING_INSTRUCTION, START_ELEMENT, START_ENTITY, TEXT, TOP_LEVEL_WHITESPACE, UNEXPANDED_ENTITY_REFERENCE |
getAttributeCount
public int getAttributeCount()
- Returns the number of attributes of this item. If the type of this item
is neither
START_ELEMENT nor
EMPTY_ELEMENT, returns 0. Default attributes are
included. Attributes serving as namespace declarations are
included.
- Returns:
- the number of attributes
getAttribute
public XmlAttributeItem getAttribute(int i)
- Returns the attribute with index
i.
i must be in the range 0 to
getAttributeCount() - 1.
- Parameters:
i - the index of the attribute to return- Throws:
IndexOutOfBoundsException - if i is not in the
range 0 to getAttributeCount() - 1
getAttribute
public XmlAttributeItem getAttribute(java.lang.String namespaceUri,
java.lang.String localName)
- Returns the attribute with the specified
localName and namespaceUri. If there
is no such attribute, returns null. If the type of this
item is not one of START_ELEMENT,
EMPTY_ELEMENT, returns null.
- Parameters:
namespaceUri - a String giving the namespace URI of the
attribute to return; null indicates an absent namespace URIlocalName - a String giving the local name of the attribute
to return; this must not be null
getAttribute
public XmlAttributeItem getAttribute(java.lang.String localName)
- Returns the attribute with the specified
localName and no namespace URI. If there
is no such attribute, returns null. If the type of this
item is not one of START_ELEMENT,
EMPTY_ELEMENT, returns null.
- Parameters:
localName - a String giving the local name of the attribute- Returns:
- an XmlAttributeItem for the attribute with the specified
local name
- See Also:
getAttribute(String,String)