***** Note: this does _not_ current attempt to cache any of the data; if you ask for attribute 27 and then 28, you'll have to rescan the first 27. It should probably at least keep track of the last one retrieved, and possibly buffer the whole array.
***** Also note that there's no fastpath for the by-name query; we search linearly until we find it or fail to find it. Again, that could be optimized at some cost in object creation/storage.
| Modifier and Type | Class and Description |
|---|---|
| public class | DTMNamedNodeMap.
Simple implementation of DOMException. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv DTM | dtm
The DTM for this node. |
| pack-priv int | element
The DTM element handle. |
| pack-priv short | m_count
The number of nodes in this map. |
| Access | Constructor and Description |
|---|---|
| public | DTMNamedNodeMap(DTM
The DTM Reference, must be non-null. dtm, int The DTM element handle. element)Create a getAttributes NamedNodeMap for a given DTM element node |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: The number of nodes in this map.Implements org. Return the number of Attributes on this Element |
| public Node | Returns: ANode (of any type) with the specified
nodeName, or null if it does not identify
any node in this map.The name)nodeName of a node to retrieve.Implements org. Retrieves a node specified by name. |
| public Node | Returns: ANode (of any type) with the specified local
name and namespace URI, or null if they do not
identify any node in this map.The namespace URI of the node to retrieve. namespaceURI, String The local name of the node to retrieve. localName)Implements org. Retrieves a node specified by local name and namespace URI. |
| public Node | Returns: The node at theindexth position in the map, or
null if that is not a valid index.The index of the requested item. i)Implements org. Returns the |
| public Node | Returns: The node removed from this map if a node with such a name exists.The name)nodeName of the node to remove.Implements org. Removes a node specified by name. |
| public Node | Returns: The node removed from this map if a node with such a local name and namespace URI exists.The namespace URI of the node to remove. namespaceURI, String The local name of the node to remove. localName)Implements org. Removes a node specified by local name and namespace URI. |
| public Node | Returns: If the newNode replaces an existing node the
replaced Node is returned, otherwise null
is returned.node to store in this map. The node will later be
accessible using the value of its newNode)nodeName attribute.Implements org. Adds a node using its |
| public Node | Returns: If the newNode replaces an existing node the
replaced Node is returned, otherwise null
is returned.A node to store in this map. The node will later be
accessible using the value of its arg)namespaceURI and
localName attributes.Implements org. Adds a node using its |
| dtm | back to summary |
|---|---|
| pack-priv DTM dtm The DTM for this node. | |
| element | back to summary |
|---|---|
| pack-priv int element The DTM element handle. | |
| m_count | back to summary |
|---|---|
| pack-priv short m_count The number of nodes in this map. | |
| DTMNamedNodeMap | back to summary |
|---|---|
| public DTMNamedNodeMap(DTM dtm, int element) Create a getAttributes NamedNodeMap for a given DTM element node
| |
| getLength | back to summary |
|---|---|
| public int getLength() Implements org. Return the number of Attributes on this Element
| |
| getNamedItem | back to summary |
|---|---|
| public Node getNamedItem(String name) Implements org. Retrieves a node specified by name. | |
| getNamedItemNS | back to summary |
|---|---|
| public Node getNamedItemNS(String namespaceURI, String localName) Implements org. Retrieves a node specified by local name and namespace URI. HTML-only DOM implementations do not need to implement this method. | |
| item | back to summary |
|---|---|
| public Node item(int i) Implements org. Returns the
| |
| removeNamedItem | back to summary |
|---|---|
| public Node removeNamedItem(String name) Implements org. Removes a node specified by name. When this map contains the attributes attached to an element, if the removed attribute is known to have a default value, an attribute immediately appears containing the default value as well as the corresponding namespace URI, local name, and prefix when applicable.
| |
| removeNamedItemNS | back to summary |
|---|---|
| public Node removeNamedItemNS(String namespaceURI, String localName) throws DOMException Implements org. Removes a node specified by local name and namespace URI. A removed
attribute may be known to have a default value when this map contains
the attributes attached to an element, as returned by the attributes
attribute of the
| |
| setNamedItem | back to summary |
|---|---|
| public Node setNamedItem(Node newNode) Implements org. Adds a node using its
| |
| setNamedItemNS | back to summary |
|---|---|
| public Node setNamedItemNS(Node arg) throws DOMException Implements org. Adds a node using its
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| DTMException | back to summary |
|---|---|
| public DTMException(short code, String message) Constructs a DOM/DTM exception. | |
| DTMException | back to summary |
|---|---|
| public DTMException(short code) Constructor DTMException | |