Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
gnu.xml.dom

Class DomNamedNodeMap

java.lang.Object
|
+--gnu.xml.dom.DomNamedNodeMap

All Implemented Interfaces:

NamedNodeMap


public class DomNamedNodeMap

extends Object

implements NamedNodeMap

"NamedNodeMap" implementation.

Used mostly to hold element attributes, but sometimes also to list notations or entities.

Author:

Constructor Summary

DomNamedNodeMap(org.w3c.dom.Document owner)

Constructs an empty map associated with the specified document.

Method Summary

voidcompact()

Reduces space utilization for this object.
intgetLength()

DOM L1 Returns the length of the map.
org.w3c.dom.NodegetNamedItem(java.lang.String name)

DOM L1 Returns the named item from the map, or null; names are just the nodeName property.
org.w3c.dom.NodegetNamedItemNS(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.
booleanisReadonly()

Exposes the internal "readonly" flag.
org.w3c.dom.Nodeitem(int index)

DOM L1 Returns the indexed item from the map, or null.
voidmakeReadonly()

Sets the internal "readonly" flag so the node and its children can't be changed.
org.w3c.dom.NoderemoveNamedItem(java.lang.String name)

DOM L1 Removes the named item from the map, or reports an exception; names are just the nodeName property.
org.w3c.dom.NoderemoveNamedItemNS(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.
org.w3c.dom.NodesetNamedItem(org.w3c.dom.Node arg)

DOM L1 Stores the named item into the map, optionally overwriting any existing node with that name.
org.w3c.dom.NodesetNamedItemNS(org.w3c.dom.Node arg)

DOM L2 Stores the named item into the map, optionally overwriting any existing node with that fully qualified name.

Constructor Details

DomNamedNodeMap

public DomNamedNodeMap(org.w3c.dom.Document owner)

Constructs an empty map associated with the specified document.

Parameters:


Method Details

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: