gnu.xml.dom
Class DomNamedNodeMap
java.lang.Object
|
+--gnu.xml.dom.DomNamedNodeMap
All Implemented Interfaces:
NamedNodeMap
"NamedNodeMap" implementation.
Used mostly to hold element attributes, but sometimes also
to list notations or entities.
Author:DomNamedNodeMap
public DomNamedNodeMap(org.w3c.dom.Document owner)
Constructs an empty map associated with the specified document.
Parameters:
compact
public void compact()
Reduces space utilization for this object.
getLength
public int getLength()
DOM L1
Returns the length of the map.
getNamedItem
public Node getNamedItem(java.lang.String name)
DOM L1
Returns the named item from the map, or null; names are just
the nodeName property.
Parameters:
getNamedItemNS
public 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.
Parameters:
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.
Parameters:
makeReadonly
public void makeReadonly()
Sets the internal "readonly" flag so the node and its
children can't be changed.
removeNamedItem
public 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.
Parameters:
removeNamedItemNS
public 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.
Parameters:
setNamedItem
public Node setNamedItem(org.w3c.dom.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.
Parameters:
setNamedItemNS
public Node setNamedItemNS(org.w3c.dom.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.
Parameters:
"NamedNodeMap" implementation.
Used mostly to hold element attributes, but sometimes also to list notations or entities.