|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.joda.property.xml.XMLData
Class defining a generic element and children structure for XML. It is a lightweight version of the DOM model.
Field Summary | |
static java.lang.String |
CDATA
|
static java.lang.String |
ID
|
static java.lang.String |
IDREF
|
Constructor Summary | |
XMLData(XMLData parent,
java.lang.String localName)
Constructor |
|
XMLData(XMLData parent,
XMLName name)
Constructor |
Method Summary | |
XMLData |
addNewChild(java.lang.String localName)
Create an XMLData child by name |
XMLData |
addNewChild(XMLName name)
Create an XMLData child by name |
org.xml.sax.Attributes |
getAttributes()
Get the attributes in SAX format |
java.lang.String |
getAttributeValue(XMLName name)
Get an attribute value |
XMLData |
getChild(int index)
Get an XMLData child by index |
XMLData |
getChild(java.lang.String name)
Get an XMLData child by name |
XMLData |
getChild(XMLName name)
Get an XMLData child by xml name |
java.util.List |
getChildren()
Get XMLData children. |
java.lang.Object |
getContent()
Get the content |
XMLName |
getName()
Get the element name |
XMLData |
getParent()
Get XMLData parent. |
java.lang.String |
getText()
Get the text |
void |
putAttribute(java.lang.String localName,
java.lang.String value)
Set a normal (CDATA) attribute with no namespace. |
void |
putAttribute(XMLName name,
java.lang.String value,
java.lang.String type)
Set an attribute |
void |
putAttributeMap(java.util.Map attributes)
Set the map of attributes. |
void |
putAttributes(org.xml.sax.Attributes attributes)
Set the map of attributes |
void |
removeAttribute(XMLName name)
Remove an attribute value |
void |
setContent(java.lang.Object content)
Set the element content |
void |
setName(XMLName name)
Set the element name. |
void |
setText(java.lang.String text)
Set the element text |
java.lang.String |
toString()
Debugging toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String CDATA
public static final java.lang.String ID
public static final java.lang.String IDREF
Constructor Detail |
public XMLData(XMLData parent, java.lang.String localName)
public XMLData(XMLData parent, XMLName name)
Method Detail |
public XMLName getName()
public void setName(XMLName name)
public XMLData getParent()
public java.util.List getChildren()
public XMLData getChild(java.lang.String name)
name
- the child namepublic XMLData getChild(XMLName name)
name
- the child xml namepublic XMLData getChild(int index)
index
- the child indexpublic XMLData addNewChild(java.lang.String localName)
public XMLData addNewChild(XMLName name)
name
- the child namepublic java.lang.String getAttributeValue(XMLName name)
name
- the name to get
public org.xml.sax.Attributes getAttributes()
public void removeAttribute(XMLName name)
name
- the name to removepublic void putAttributes(org.xml.sax.Attributes attributes)
attributes
- add the attributes passed in to the attributes heldpublic void putAttributeMap(java.util.Map attributes)
attributes
- add the attributes passed in to the attributes heldpublic void putAttribute(java.lang.String localName, java.lang.String value)
localName
- value
- public void putAttribute(XMLName name, java.lang.String value, java.lang.String type)
name
- the xml namevalue
- the string valuetype
- the XML type, CDATA, ID or IDREFpublic java.lang.Object getContent()
public void setContent(java.lang.Object content)
public java.lang.String getText()
public void setText(java.lang.String text)
public java.lang.String toString()
toString
in class java.lang.Object
|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |