Element

extends Parent

An Element object represents an XML Element. An Element has a name, a set of attributes and a set of child nodes.

Constructors

Element other, Node deep name = other.name; attributes = new java.util.HashMap(); // tbd copy attributes attributes.putAll(other.attributes); Name name this.name = name.getName(); attributes = new java.util.HashMap(); Node name this.name = new Name(name.stringValue()); attributes = new java.util.HashMap(); Node namespace, Node name this.name = new Name(namespace.stringValue(), name.stringValue()); attributes = new java.util.HashMap();

Type Functions

attribute(Node name)

Get the named Element attribute.

Returns: A Attribute .

attribute(Name name)

Get the named Element attribute.

Returns: A Attribute .

attribute(Attribute attribute)

Set an Element attribute

attribute(Node name, Node value)

Set the value of a named attribute.

attribute(Name name, Node value)

Set the value of a named attribute.

attributes()

Get all Element attributes

name()

Get the name of this element.

Returns: A Name node.

name(Node name)

Set the name of this element.

name(Name name)

Set the name of this element.

string()

The string-value of an element node is the concatenation of the string-values of all text node descendants of the element node in document order.

Functions inherited from Parent