|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Element
Utility class to represent an XML tree.
| Method Summary | |
|---|---|
Element |
addAttribute(Attr attr)
Adds the specified attribute. |
Element |
addChild(Element elem)
Adds the specified child Element. |
Element |
appendText(String text)
Appends text to this element's character content. |
Attr |
getAttribute(String name)
Fetches an attribute by name. |
Iterator<Attr> |
getAttributes()
Fetches this Element's attributes. |
Element |
getChild(int index)
Fetches a child Element by index. |
Iterator<Element> |
getChildren()
Returns this Element's children. |
ElementContext |
getContext()
Returns the context of this Element. |
Element |
getParent()
Returns the element's parent, which may be null. |
Tag |
getTag()
Returns the element tag. |
String |
getText()
Returns the character content of this Element. |
Element |
removeAttribute(Attr attr)
Remove the given attribute. |
Element |
removeAttribute(String name)
Remove an attribute by name. |
Element |
removeChild(Element elem)
Remove the specified child Element. |
Element |
removeChild(int index)
Remove a child Element by index. |
Element |
setContext(ElementContext ctx)
Sets the context of this Element. |
Element |
setParent(Element parent)
Sets the parent of this Element. |
Element |
setText(String text)
Sets the character content of this Element. |
| Method Detail |
|---|
Tag getTag()
Element addAttribute(Attr attr)
attr - The attribute to add.
ElementAttr getAttribute(String name)
name - The attribute name.
null, if no attribute with the given name existsIterator<Attr> getAttributes()
Element's attributes.
Element's attributes.Element removeAttribute(Attr attr)
attr - The attribute to remove
ElementElement removeAttribute(String name)
name - The name of the attribute to remove
ElementElement addChild(Element elem)
Element.
elem - The child to add.
ElementElement getChild(int index)
Element by index.
index - The index of the child to fetch
null, if no child with the given name existsIterator<Element> getChildren()
Element's children.
Element's childrenElement removeChild(Element elem)
Element.
elem - The child to remove.
ElementElement removeChild(int index)
Element by index.
index - The index of the child to remove
ElementElement getParent()
null.
null.Element setParent(Element parent)
Element.
parent - The parent to set
ElementElement appendText(String text)
text - The content to append.
ElementElementContext getContext()
Element.
Element.Element setContext(ElementContext ctx)
Element.
ctx - The context to set
ElementString getText()
Element.
Element.Element setText(String text)
Element.
text - The character content to set
Element
|
Please visit Base Apps, hosted on Sourceforge.net. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||