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

Class DomNamedNodeMap

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

All Implemented Interfaces:
NamedNodeMap


public class DomNamedNodeMap
extends java.lang.Object
implements NamedNodeMap

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

Author:
David Brownell

Constructor Summary

DomNamedNodeMap(Document owner)

Constructs an empty map associated with the specified document.

Method Summary

void

compact()

Reduces space utilization for this object.

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.

Constructor Details

DomNamedNodeMap

public DomNamedNodeMap(Document owner)

Constructs an empty map associated with the specified document.

Parameters:
owner

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:
name

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:
namespaceURI
localName

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:
index

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:
name

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:
namespaceURI
localName

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.

Parameters:
arg

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.

Parameters:
arg