|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sunwesttek.xml.SimpleDOMElement
SimpleDOMElement
is a highly-simplified XML DOM element
implementation.
Constructor Summary | |
SimpleDOMElement(java.lang.String tagName)
Construct a SimpleDOMElement with specified tag name. |
Method Summary | |
void |
addChildElement(DOMElement element)
Add an element as a child of the current element. |
java.lang.String |
getAttribute(java.lang.String name)
Get the value of the attribute with specified name. |
java.util.List |
getChildElements()
Get all the child elements of the current element. |
java.util.List |
getChildElementsByTagName(java.lang.String tagName)
Get all the child elements of the current element with specified tag name. |
java.lang.String |
getTagName()
Get the tag name of the element. |
java.lang.String |
getText()
Get the text of the element. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Add/replace the value of the attribute with specified name. |
void |
setTagName(java.lang.String tagName)
Set the tag name of the element. |
void |
setText(java.lang.String text)
Set the text of the element. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleDOMElement(java.lang.String tagName)
tagName
- Tag nameMethod Detail |
public java.lang.String getTagName()
getTagName
in interface DOMElement
public void setTagName(java.lang.String tagName)
tagName
- Tag namepublic java.lang.String getText()
getText
in interface DOMElement
public void setText(java.lang.String text)
text
- Textpublic java.lang.String getAttribute(java.lang.String name)
getAttribute
in interface DOMElement
name
- Attribute name
public void setAttribute(java.lang.String name, java.lang.String value)
name
- Attribute namevalue
- Attribute valuepublic void addChildElement(DOMElement element)
element
- Child elementpublic java.util.List getChildElements()
getChildElements
in interface DOMElement
public java.util.List getChildElementsByTagName(java.lang.String tagName)
getChildElementsByTagName
in interface DOMElement
tagName
- Tag name
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |