org.gjt.xpp.impl.tag

Class StartTag

public class StartTag extends Tag implements XmlStartTag

Encapsulate XML STag and EmptyElement

Author: Aleksander Slominski

Constructor Summary
StartTag()
Method Summary
voidaddAttribute(String namespaceUri, String localName, String rawName, String value)
parameters modeled after SAX2 attribute approach
voidaddAttribute(String namespaceUri, String localName, String rawName, String value, boolean isNamespaceDeclaration)
voidensureAttributesCapacity(int minCapacity)
Make sure that there is enough space to keep size attributes.
booleanequals(Object o)
intgetAttributeCount()
Return number of attributes.
StringgetAttributeLocalName(int index)
Get localName of attribute number index (starts from 0) if namespaces enabled or just attribute name if namespaces disabled.
StringgetAttributeNamespaceUri(int index)
Get uri of attribute number index (starts from 0). (meaningful only if namespaces enabled)
StringgetAttributePrefix(int index)
StringgetAttributeRawName(int index)
Return qName of atrribute number index (starts from 0)
StringgetAttributeValue(int index)
Return value of attribute number index.
StringgetAttributeValueFromName(String uri, String localName)
Return value of attribute named (uri, localName) or null of no such attribute found. (meaningful only if namespaces enabled)
StringgetAttributeValueFromRawName(String qName)
Return value of attribute named qName or null of no such attribute found.
booleanisAttributeNamespaceDeclaration(int index)
protected voidprintFields(StringBuffer buf)
booleanremoveAttributeByName(String uri, String localName)
booleanremoveAttributeByRawName(String rawName)
voidremoveAttributes()
remove all atribute
voidresetStartTag()
Reinitialize start tag content to none
StringtoString()
Return string representation of start tag including name and list of attributes.

Constructor Detail

StartTag

public StartTag()

Method Detail

addAttribute

public void addAttribute(String namespaceUri, String localName, String rawName, String value)
parameters modeled after SAX2 attribute approach

addAttribute

public void addAttribute(String namespaceUri, String localName, String rawName, String value, boolean isNamespaceDeclaration)

ensureAttributesCapacity

public void ensureAttributesCapacity(int minCapacity)
Make sure that there is enough space to keep size attributes.

equals

public boolean equals(Object o)

getAttributeCount

public int getAttributeCount()
Return number of attributes.

getAttributeLocalName

public String getAttributeLocalName(int index)
Get localName of attribute number index (starts from 0) if namespaces enabled or just attribute name if namespaces disabled.

getAttributeNamespaceUri

public String getAttributeNamespaceUri(int index)
Get uri of attribute number index (starts from 0). (meaningful only if namespaces enabled)

getAttributePrefix

public String getAttributePrefix(int index)

getAttributeRawName

public String getAttributeRawName(int index)
Return qName of atrribute number index (starts from 0)

getAttributeValue

public String getAttributeValue(int index)
Return value of attribute number index.

getAttributeValueFromName

public String getAttributeValueFromName(String uri, String localName)
Return value of attribute named (uri, localName) or null of no such attribute found. (meaningful only if namespaces enabled)

getAttributeValueFromRawName

public String getAttributeValueFromRawName(String qName)
Return value of attribute named qName or null of no such attribute found.

isAttributeNamespaceDeclaration

public boolean isAttributeNamespaceDeclaration(int index)

printFields

protected void printFields(StringBuffer buf)

removeAttributeByName

public boolean removeAttributeByName(String uri, String localName)

removeAttributeByRawName

public boolean removeAttributeByRawName(String rawName)

removeAttributes

public void removeAttributes()
remove all atribute

resetStartTag

public void resetStartTag()
Reinitialize start tag content to none

toString

public String toString()
Return string representation of start tag including name and list of attributes.
Copyright (c) 2003 IU Extreme! Lab http://www.extreme.indiana.edu/ All Rights Reserved.

Note this package is deprecated by XPP3 that implements XmlPull API