net.n3.nanoxml
public interface IXMLElement
Version: $Name: RELEASE_2_2_1 $, $Revision: 1.4 $
Field Summary | |
---|---|
static int | NO_LINE
No line number defined. |
Method Summary | |
---|---|
void | addChild(IXMLElement child)
Adds a child element.
|
IXMLElement | createElement(String fullName)
Creates an empty element.
|
IXMLElement | createElement(String fullName, String systemID, int lineNr)
Creates an empty element.
|
IXMLElement | createElement(String fullName, String namespace)
Creates an empty element.
|
IXMLElement | createElement(String fullName, String namespace, String systemID, int lineNr)
Creates an empty element.
|
IXMLElement | createPCDataElement()
Creates an element to be used for #PCDATA content. |
Enumeration | enumerateAttributeNames()
Returns an enumeration of all attribute names.
|
Enumeration | enumerateChildren()
Returns an enumeration of all child elements.
|
boolean | equals(Object rawElement)
Returns true if the element equals another element.
|
boolean | equalsXMLElement(IXMLElement elt)
Returns true if the element equals another element.
|
String | getAttribute(String name) |
String | getAttribute(String name, String defaultValue)
Returns the value of an attribute.
|
String | getAttribute(String name, String namespace, String defaultValue)
Returns the value of an attribute.
|
int | getAttribute(String name, int defaultValue)
Returns the value of an attribute.
|
int | getAttribute(String name, String namespace, int defaultValue)
Returns the value of an attribute.
|
int | getAttributeCount()
Returns the number of attributes. |
String | getAttributeNamespace(String name)
Returns the namespace of an attribute.
|
Properties | getAttributes()
Returns all attributes as a Properties object.
|
Properties | getAttributesInNamespace(String namespace)
Returns all attributes in a specific namespace as a Properties object.
|
String | getAttributeType(String name)
Returns the type of an attribute.
|
String | getAttributeType(String name, String namespace)
Returns the type of an attribute.
|
IXMLElement | getChildAtIndex(int index)
Returns the child at a specific index.
|
Vector | getChildren()
Returns a vector containing all the child elements.
|
int | getChildrenCount()
Returns the number of children.
|
Vector | getChildrenNamed(String name)
Returns a vector of all child elements named name.
|
Vector | getChildrenNamed(String name, String namespace)
Returns a vector of all child elements named name.
|
String | getContent()
Return the #PCDATA content of the element. |
IXMLElement | getFirstChildNamed(String name)
Searches a child element.
|
IXMLElement | getFirstChildNamed(String name, String namespace)
Searches a child element.
|
String | getFullName()
Returns the full name (i.e. the name including an eventual namespace
prefix) of the element.
|
int | getLineNr()
Returns the line number in the data where the element started.
|
String | getName()
Returns the name of the element.
|
String | getNamespace()
Returns the namespace of the element.
|
IXMLElement | getParent()
Returns the parent element. |
String | getSystemID()
Returns the system ID of the data where the element started.
|
boolean | hasAttribute(String name)
Returns whether an attribute exists.
|
boolean | hasAttribute(String name, String namespace)
Returns whether an attribute exists.
|
boolean | hasChildren()
Returns whether the element has children.
|
boolean | isLeaf()
Returns whether the element is a leaf element.
|
void | removeAttribute(String name)
Removes an attribute.
|
void | removeAttribute(String name, String namespace)
Removes an attribute.
|
void | removeChild(IXMLElement child)
Removes a child element.
|
void | removeChildAtIndex(int index)
Removes the child located at a certain index.
|
void | setAttribute(String name, String value)
Sets an attribute.
|
void | setAttribute(String fullName, String namespace, String value)
Sets an attribute.
|
void | setContent(String content)
Sets the #PCDATA content. |
void | setName(String name)
Sets the full name. |
void | setName(String fullName, String namespace)
Sets the name.
|
Parameters: child the non-null child to add.
Parameters: fullName the name of the element.
Parameters: fullName the name of the element. systemID the system ID of the XML data where the element starts. lineNr the line in the XML data where the element starts.
Parameters: fullName the full name of the element namespace the namespace URI.
Parameters: fullName the full name of the element namespace the namespace URI. systemID the system ID of the XML data where the element starts. lineNr the line in the XML data where the element starts.
Returns: the non-null enumeration.
Returns: the non-null enumeration
Parameters: rawElement the element to compare to
Parameters: rawElement the element to compare to
Deprecated: As of NanoXML/Java 2.0.1, replaced by IXMLElement Returns the value of an attribute.
Parameters: name the non-null name of the attribute.
Returns: the value, or null if the attribute does not exist.
Parameters: name the non-null full name of the attribute. defaultValue the default value of the attribute.
Returns: the value, or defaultValue if the attribute does not exist.
Parameters: name the non-null name of the attribute. namespace the namespace URI, which may be null. defaultValue the default value of the attribute.
Returns: the value, or defaultValue if the attribute does not exist.
Parameters: name the non-null full name of the attribute. defaultValue the default value of the attribute.
Returns: the value, or defaultValue if the attribute does not exist.
Parameters: name the non-null name of the attribute. namespace the namespace URI, which may be null. defaultValue the default value of the attribute.
Returns: the value, or defaultValue if the attribute does not exist.
Parameters: name the non-null full name of the attribute.
Returns: the namespace, or null if there is none associated.
Returns: the non-null set.
Parameters: namespace the namespace URI of the attributes, which may be null.
Returns: the non-null set.
Parameters: name the non-null full name of the attribute.
Returns: the type, or null if the attribute does not exist.
Parameters: name the non-null name of the attribute. namespace the namespace URI, which may be null.
Returns: the type, or null if the attribute does not exist.
Parameters: index the index of the child
Returns: the non-null child
Throws: java.lang.ArrayIndexOutOfBoundsException if the index is out of bounds.
Returns: the vector.
Returns: the count.
Parameters: name the full name of the children to search for.
Returns: the non-null vector of child elements.
Parameters: name the name of the children to search for. namespace the namespace, which may be null.
Returns: the non-null vector of child elements.
Returns: the content.
Parameters: name the full name of the child to search for.
Returns: the child element, or null if no such child was found.
Parameters: name the name of the child to search for. namespace the namespace, which may be null.
Returns: the child element, or null if no such child was found.
Returns: the name, or null if the element only contains #PCDATA.
Returns: the line number, or NO_LINE if unknown.
See Also: NO_LINE IXMLElement
Returns: the name, or null if the element only contains #PCDATA.
Returns: the namespace, or null if no namespace is associated with the element.
Returns: the system ID, or null if unknown.
See Also: IXMLElement
Parameters: name the non-null name of the attribute.
Returns: true if the attribute exists.
Parameters: name the non-null name of the attribute. namespace the namespace URI of the attribute, which may be null.
Returns: true if the attribute exists.
Returns: true if the element has children.
Returns: true if the element has no children.
Parameters: name the non-null name of the attribute.
Parameters: name the non-null name of the attribute. namespace the namespace URI of the attribute, which may be null.
Parameters: child the non-null child to remove.
Parameters: index the index of the child, where the first child has index 0.
Parameters: name the non-null full name of the attribute. value the non-null value of the attribute.
Parameters: fullName the non-null full name of the attribute. namespace the namespace URI of the attribute, which may be null. value the non-null value of the attribute.
Parameters: content the (possibly null) content.
Parameters: name the non-null name.
Parameters: fullName the non-null full name. namespace the namespace URI, which may be null.