Interface Element
public
interface
Element
extends
Node
This interface represents XML DOM elements, which are the basic building
block of XML. An example follows:
Some text more text
Methods
Method Detail
getAttribute
This method retrieves the attribute which has a name of
name
.
Parameters
- name
- the name of the attribute to get the value of
Return Value
the value of the attribute specified by
name
getAttributeNode
This method retrieves the attribute node which has a name of
name
. This
Attr
will have the same value as
would be gotten with
getAttribute
.
Parameters
- name
- the name of the
Attr
to get
Return Value
the attribute node of this
Element
which has a name
of
name
getElementsByTagName
This method retrieves the elements by tag name which has a name of
name
.
Parameters
- name
- the name of the
Element
to get
Return Value
the elements by tag name of this
Element
which has a
name of
name
getTagName
This method retrieves the tag name.
Return Value
the tag name of this
Element
hasAttribute
public boolean
hasAttribute(
String name)
This method determines whether this
Element
has an attribute
with the supplied name.
Parameters
- name
- the name of the attribute
Return Value
true
if this
Element
has an attribute
that name.
removeAttribute
public void
removeAttribute(
String name)
This method removes the attribute which has the specified name.
Parameters
- name
- the name of the attribute to remove
setAttribute
This method sets the attribute specified by
name
to
value
.
Parameters
- name
- the name of the attribute to set
- value
- the new value this attribute is to have