|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.openharbor.xmlj.Element
An XML element. This is a simple Document Object Model (DOM).
This model is less detailed than DOM4j or JDOM.
For example, XML comments are not copied to Java objects, nor vice-versa.
The positions of sub-elements within text are not represented; that is,
XML text that is interspersed with elements is copied from XML as a
single String (the value
property).
When copied to XML, the complete text comes first, followed by
all the elements.
Nested Class Summary | |
protected static class |
Element.AttributeMap
A Map representing the attributes of an Element. |
protected static class |
Element.ElementList
A List representing the subElements of an Element. |
Field Summary | |
static java.lang.String |
EMPTY_VALUE
|
Constructor Summary | |
Element()
It would be simpler Java to make attributes a member of attributeNanny and subElements a member of elementNanny. |
|
Element(java.lang.String name)
|
|
Element(com.openharbor.beck.xml.XMLName name)
|
Method Summary | |
java.util.Map |
getAttributes()
Attributes of this Element. |
com.openharbor.beck.xml.XMLName |
getName()
|
Element |
getParent()
|
java.util.List |
getSubElements()
Elements that are contained in this one. |
java.lang.String |
getValue()
|
protected Element.AttributeMap |
newAttributeMap(java.util.Map real)
Override this to customize the implementation of the attributes' Map. |
protected Element.ElementList |
newElementList()
Override this to customize the implementation of the subElements' List. |
void |
setName(com.openharbor.beck.xml.XMLName name)
|
void |
setValue(java.lang.String value)
Set the text contained in this element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String EMPTY_VALUE
Constructor Detail |
public Element()
public Element(com.openharbor.beck.xml.XMLName name)
public Element(java.lang.String name)
Method Detail |
public com.openharbor.beck.xml.XMLName getName()
public void setName(com.openharbor.beck.xml.XMLName name)
public java.lang.String getValue()
public void setValue(java.lang.String value)
public Element getParent()
public java.util.Map getAttributes()
public java.util.List getSubElements()
protected Element.AttributeMap newAttributeMap(java.util.Map real)
protected Element.ElementList newElementList()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |