|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IXMLElement
Interface of the adaptator between the methods of nanoXml and javax
| Field Summary | |
|---|---|
static int |
NO_LINE
No line number defined. |
| Method Summary | |
|---|---|
void |
addChild(IXMLElement child)
Adds a child element. |
java.util.Enumeration |
enumerateAttributeNames()
Returns an enumeration of all attribute names. |
java.lang.String |
getAttribute(java.lang.String name)
Returns the value of an attribute. |
java.lang.String |
getAttribute(java.lang.String name,
java.lang.String defaultValue)
Returns the value of an attribute. |
java.util.Properties |
getAttributes()
Returns all attributes as a Properties object. |
IXMLElement |
getChildAtIndex(int index)
Returns the child at a specific index. |
java.util.Vector<IXMLElement> |
getChildren()
Returns a vector containing all the child elements. |
int |
getChildrenCount()
Returns the number of children. |
java.util.Vector<IXMLElement> |
getChildrenNamed(java.lang.String name)
Returns a vector of all child elements named name. |
java.lang.String |
getContent()
Return the #PCDATA content of the element. |
org.w3c.dom.Node |
getElement()
Get the embeded node of the XmlElement |
IXMLElement |
getFirstChildNamed(java.lang.String name)
Searches a child element. |
int |
getLineNr()
Returns the line number in the data where the element started. |
java.lang.String |
getName()
Returns the name of the element. |
boolean |
hasAttribute(java.lang.String name)
Returns whether an attribute exists. |
boolean |
hasChildren()
Returns whether the element has children. |
void |
removeAttribute(java.lang.String name)
Removes an attribute. |
void |
removeChild(IXMLElement child)
Removes a child element. |
void |
setAttribute(java.lang.String name,
java.lang.String value)
Sets an attribute. |
void |
setContent(java.lang.String content)
Sets the #PCDATA content. |
| Field Detail |
|---|
static final int NO_LINE
| Method Detail |
|---|
java.lang.String getName()
void addChild(IXMLElement child)
child - the non-null child to add.void removeChild(IXMLElement child)
child - the non-null child to remove.boolean hasChildren()
int getChildrenCount()
java.util.Vector<IXMLElement> getChildren()
IXMLElement getChildAtIndex(int index)
throws java.lang.ArrayIndexOutOfBoundsException
index - Index of the child
java.lang.ArrayIndexOutOfBoundsException - if the index is out of bounds.IXMLElement getFirstChildNamed(java.lang.String name)
name - the name of the child to search for.
java.util.Vector<IXMLElement> getChildrenNamed(java.lang.String name)
name - the name of the children to search for.
java.lang.String getAttribute(java.lang.String name)
name - the non-null name of the attribute.
java.lang.String getAttribute(java.lang.String name,
java.lang.String defaultValue)
name - the non-null name of the attribute.defaultValue - the default value of the attribute.
void setAttribute(java.lang.String name,
java.lang.String value)
name - the non-null name of the attribute.value - the non-null value of the attribute.void removeAttribute(java.lang.String name)
name - the non-null name of the attribute.java.util.Enumeration enumerateAttributeNames()
boolean hasAttribute(java.lang.String name)
name - The name of the attribute
java.util.Properties getAttributes()
int getLineNr()
NO_LINEjava.lang.String getContent()
void setContent(java.lang.String content)
content - the (possibly null) content.org.w3c.dom.Node getElement()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||