org.tigris.gef.persistence
Class XMLElement
java.lang.Object
org.tigris.gef.persistence.XMLElement
- public class XMLElement
- extends java.lang.Object
Constructor Summary |
XMLElement(java.lang.String n,
org.xml.sax.Attributes a)
Constructor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLElement
public XMLElement(java.lang.String n,
org.xml.sax.Attributes a)
- Constructor.
- Parameters:
n
- The name of the element.a
- The attributes.
getName
public java.lang.String getName()
- Returns:
- the name of this element
setName
public void setName(java.lang.String n)
- Parameters:
n
- the name of this element
addText
public void addText(java.lang.String t)
- Parameters:
t
- the text to be appended
setText
public void setText(java.lang.String t)
- Parameters:
t
- the new text
resetText
public void resetText()
- Erase the text of this element.
getText
public java.lang.String getText()
- Returns:
- the text of this element
setAttributes
public void setAttributes(org.xml.sax.Attributes a)
- Change the attributes for this element.
- Parameters:
a
- The new list of attributes.
getAttribute
public java.lang.String getAttribute(java.lang.String attribute)
- Parameters:
attribute
- the attribute name
- Returns:
- the attribute value
getAttributeName
public java.lang.String getAttributeName(int i)
- Parameters:
i
- the index for the list of attributes
- Returns:
- the attribute name for the attribute at the given index
getAttributeValue
public java.lang.String getAttributeValue(int i)
- Parameters:
i
- the index for the list of attributes
- Returns:
- the attribute value for the attribute at the given index
getNumAttributes
public int getNumAttributes()
- Returns:
- the number of attributes