|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttuwien.auto.calimero.xml.def.DefaultElement
public class DefaultElement
Default implementation of XML element.
| Constructor Summary | |
|---|---|
DefaultElement(java.lang.String name)
Creates a new element name. |
|
| Method Summary | |
|---|---|
void |
addAttribute(Attribute a)
Adds a new attribute associated with this element. |
java.lang.String |
getAttribute(java.lang.String name)
Returns the value of the attribute with name. |
java.lang.String |
getCharacterData()
Returns the character data contained in this element. |
java.lang.String |
getName()
Returns the name of this element, the element type. |
boolean |
hasAttribute(java.lang.String name)
Returns whether an attribute with the given name is associated with this element. |
boolean |
isEmptyElementTag()
Returns whether this element uses an empty element tag to indicate an empty element. |
void |
setCharacterData(java.lang.String data)
Sets the character data contained in this element. |
void |
setEmptyElementTag(boolean empty)
Determines if this element uses an empty element tag. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultElement(java.lang.String name)
name.
name - name of element, the element's type| Method Detail |
|---|
public final void addAttribute(Attribute a)
Element
addAttribute in interface Elementa - the attribute to addpublic final java.lang.String getAttribute(java.lang.String name)
Elementname.
getAttribute in interface Elementname - name of attribute to get attribute value
null if no such attributepublic final java.lang.String getCharacterData()
Element
Character data is the element's content without markup. No formatting is done on
character data.
Put it more simple, character data is the actual value information (in textual
format) of an element.
getCharacterData in interface Elementnull if no data availablepublic final java.lang.String getName()
Element
getName in interface Elementpublic boolean hasAttribute(java.lang.String name)
Element
hasAttribute in interface Elementname - attribute name
true if an attribute with the given name is associated with
this element, false otherwisepublic final boolean isEmptyElementTag()
Element
An element with no content is said to be empty. An empty element tag is of the form
'<' Name (S Attribute)* S? '/>', with S being
space. Note that if this method returns false, it does not imply
this element has any content, returned by Element.getCharacterData().
isEmptyElementTag in interface Elementtrue if empty element with empty element tag,
false otherwisepublic final void setCharacterData(java.lang.String data)
Element
If new character data is set, the empty element tag is set false.
setCharacterData in interface Elementdata - character data of this element, null for no datapublic final void setEmptyElementTag(boolean empty)
ElementIf empty element tag is used, this element also has no content.
setEmptyElementTag in interface Elementempty - true if empty element, false otherwise
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||