|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gnu.xml.dom.DomNamedNodeMap
"NamedNodeMap" implementation.
Constructor Summary | |
DomNamedNodeMap(Document owner)
Constructs an empty map associated with the specified document. |
Method Summary | |
int |
getLength()
DOM L1 Returns the length of the map. |
Node |
getNamedItem(java.lang.String name)
DOM L1 Returns the named item from the map, or null; names are just the nodeName property. |
Node |
getNamedItemNS(java.lang.String namespaceURI,
java.lang.String localName)
DOM L2 Returns the named item from the map, or null; names are the localName and namespaceURI properties, ignoring any prefix. |
boolean |
isReadonly()
Exposes the internal "readonly" flag. |
Node |
item(int index)
DOM L1 Returns the indexed item from the map, or null. |
void |
makeReadonly()
Sets the internal "readonly" flag so the node and its children can't be changed. |
Node |
removeNamedItem(java.lang.String name)
DOM L1 Removes the named item from the map, or reports an exception; names are just the nodeName property. |
Node |
removeNamedItemNS(java.lang.String namespaceURI,
java.lang.String localName)
DOM L2 Removes the named item from the map, or reports an exception; names are the localName and namespaceURI properties. |
Node |
setNamedItem(Node arg)
DOM L1 Stores the named item into the map, optionally overwriting any existing node with that name. |
Node |
setNamedItemNS(Node arg)
DOM L2 Stores the named item into the map, optionally overwriting any existing node with that fully qualified name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DomNamedNodeMap(Document owner)
Method Detail |
public final boolean isReadonly()
public void makeReadonly()
public Node getNamedItem(java.lang.String name)
getNamedItem
in interface NamedNodeMap
org.w3c.dom.NamedNodeMap
nameThe
- nodeName
of a node to retrieve.Node
(of any type) with the specified
nodeName
, or null
if it does not identify
any node in this map.public Node getNamedItemNS(java.lang.String namespaceURI, java.lang.String localName)
getNamedItemNS
in interface NamedNodeMap
org.w3c.dom.NamedNodeMap
namespaceURIThe
- namespace URI of the node to retrieve.localNameThe
- local name of the node to retrieve.Node
(of any type) with the specified local
name and namespace URI, or null
if they do not
identify any node in this map.public Node setNamedItem(Node arg)
setNamedItem
in interface NamedNodeMap
org.w3c.dom.NamedNodeMap
argA
- node to store in this map. The node will later be
accessible using the value of its nodeName
attribute.Node
replaces an existing node the
replaced Node
is returned, otherwise null
is returned.DOMException
- WRONG_DOCUMENT_ERR: Raised if arg
was created from a
different document than the one that created this map.
arg
is an
Attr
that is already an attribute of another
Element
object. The DOM user must explicitly clone
Attr
nodes to re-use them in other elements.public Node setNamedItemNS(Node arg)
setNamedItemNS
in interface NamedNodeMap
org.w3c.dom.NamedNodeMap
argA
- node to store in this map. The node will later be
accessible using the value of its namespaceURI
and
localName
attributes.Node
replaces an existing node the
replaced Node
is returned, otherwise null
is returned.DOMException
- WRONG_DOCUMENT_ERR: Raised if arg
was created from a
different document than the one that created this map.
arg
is an
Attr
that is already an attribute of another
Element
object. The DOM user must explicitly clone
Attr
nodes to re-use them in other elements.public Node removeNamedItem(java.lang.String name)
removeNamedItem
in interface NamedNodeMap
org.w3c.dom.NamedNodeMap
nameThe
- nodeName
of the node to remove.DOMException
- NOT_FOUND_ERR: Raised if there is no node named name
in
this map.
public Node removeNamedItemNS(java.lang.String namespaceURI, java.lang.String localName)
removeNamedItemNS
in interface NamedNodeMap
org.w3c.dom.NamedNodeMap
namespaceURIThe
- namespace URI of the node to remove.localNameThe
- local name of the node to remove.DOMException
- NOT_FOUND_ERR: Raised if there is no node with the specified
namespaceURI
and localName
in this map.
public Node item(int index)
item
in interface NamedNodeMap
org.w3c.dom.NamedNodeMap
indexIndex
- into this map.index
th position in the map, or
null
if that is not a valid index.public int getLength()
getLength
in interface NamedNodeMap
|
Source code is GPL'd in the JAXP subproject at http://savannah.gnu.org/projects/classpathx |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |