public interface IElement
IElement is an information container in the infoset abstraction.
The IElement contains optional other IAttribute or
IElement instances and a text value.| Modifier and Type | Method and Description |
|---|---|
String |
asXML()
This
IElement serialized as an XML string. |
IAttribute |
attribute(String name)
The
IAttribute named "name" within this element or null if it
does not exist. |
Iterator<String> |
attributeNames()
An
Iterator providing all attribute names attached to this
element. |
String |
attributeTemplate(String name)
If this implementation supports template expansion, return the template
(unexpanded) value of the
IAttribute named "name" in this element
or null if it does not exist. |
String |
attributeValue(String name,
String defaultValue)
The value of the
IAttribute named "name" in this element or
"defaultValue" if it does not exist. |
IElement |
element(String name)
The (first)
IElement named "name" within this element or null if
it does not exist. |
Iterator<IElement> |
elementIterator()
|
Iterator<IElement> |
elementIterator(String name)
|
void |
elementRemove(IElement targetElement)
Remove targeElement from this.
|
void |
elementsClear()
Remove all child
IElement instances . |
String |
elementText(String name)
The text content of the
IElement named "name" within this element
or null if the child does not exist. |
String |
getName()
The name of this
IElement. |
String |
getText()
The text content of this element.
|
boolean |
hasAttribute(String name)
true if this
IElement has IAttribute instances with name |
boolean |
hasAttributes()
true if this
IElement has IAttribute instances. |
boolean |
hasElements()
|
boolean |
hasElements(String name)
|
IElement |
newElement(String name)
Create and attach a new
IElement |
void |
setAttributeTemplate(String name,
String template)
If this implementation supports template expansion, set the template
(unexpanded) value for an attribute.
|
void |
setAttributeValue(String name,
String value)
Set the value for an attribute.
|
void |
setName(String name)
Set the element name to "name".
|
void |
setText(String value)
Set the element text content to "value".
|
IAttribute attribute(String name)
IAttribute named "name" within this element or null if it
does not exist.name - Iterator<String> attributeNames()
Iterator providing all attribute names attached to this
element. There's no guarantee on the order of the names.String attributeTemplate(String name)
IAttribute named "name" in this element
or null if it does not exist.name - String attributeValue(String name, String defaultValue)
IAttribute named "name" in this element or
"defaultValue" if it does not exist.name - IElement element(String name)
IElement named "name" within this element or null if
it does not exist.name - void elementRemove(IElement targetElement)
targetElement - void elementsClear()
IElement instances .String elementText(String name)
IElement named "name" within this element
or null if the child does not exist.string - String getText()
boolean hasAttribute(String name)
IElement has IAttribute instances with nameboolean hasAttributes()
IElement has IAttribute instances.boolean hasElements()
boolean hasElements(String name)
IElement newElement(String name)
IElementname - void setAttributeTemplate(String name, String template)
name - value - void setAttributeValue(String name, String value)
name - value - void setName(String name)
xeQuery - void setText(String value)
value - Copyright © 2013 intarsys consulting GmbH. All Rights Reserved.