gnu.xml.dom
Class DomNamedNodeMap
java.lang.Object
gnu.xml.dom.DomNamedNodeMap
- NamedNodeMap
public class DomNamedNodeMap
extends java.lang.Object
"NamedNodeMap" implementation.
Used mostly to hold element attributes, but sometimes also
to list notations or entities.
int | getLength() - DOM L1
Returns the length of the map.
|
Node | getNamedItem(String name) - DOM L1
Returns the named item from the map, or null; names are just
the nodeName property.
|
Node | getNamedItemNS(String namespaceURI, 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(String name) - DOM L1
Removes the named item from the map, or reports an exception;
names are just the nodeName property.
|
Node | removeNamedItemNS(String namespaceURI, 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.
|
getLength
public int getLength()
DOM L1
Returns the length of the map.
- getLength in interface NamedNodeMap
getNamedItem
public Node getNamedItem(String name)
DOM L1
Returns the named item from the map, or null; names are just
the nodeName property.
- getNamedItem in interface NamedNodeMap
getNamedItemNS
public Node getNamedItemNS(String namespaceURI,
String localName)
DOM L2
Returns the named item from the map, or null; names are the
localName and namespaceURI properties, ignoring any prefix.
- getNamedItemNS in interface NamedNodeMap
isReadonly
public final boolean isReadonly()
Exposes the internal "readonly" flag. In DOM, all NamedNodeMap
objects found in a DocumentType object are read-only (after
they are fully constructed), and those holding attributes of
a readonly element will also be readonly.
item
public Node item(int index)
DOM L1
Returns the indexed item from the map, or null.
- item in interface NamedNodeMap
makeReadonly
public void makeReadonly()
Sets the internal "readonly" flag so the node and its
children can't be changed.
removeNamedItem
public Node removeNamedItem(String name)
DOM L1
Removes the named item from the map, or reports an exception;
names are just the nodeName property.
- removeNamedItem in interface NamedNodeMap
removeNamedItemNS
public Node removeNamedItemNS(String namespaceURI,
String localName)
DOM L2
Removes the named item from the map, or reports an exception;
names are the localName and namespaceURI properties.
- removeNamedItemNS in interface NamedNodeMap
setNamedItem
public Node setNamedItem(Node arg)
DOM L1
Stores the named item into the map, optionally overwriting
any existing node with that name. The name used is just
the nodeName attribute.
- setNamedItem in interface NamedNodeMap
setNamedItemNS
public Node setNamedItemNS(Node arg)
DOM L2
Stores the named item into the map, optionally overwriting
any existing node with that fully qualified name. The name
used incorporates the localName and namespaceURI properties,
and ignores any prefix.
- setNamedItemNS in interface NamedNodeMap