public class AttributeMap extends NamedNodeMapImpl
This class doesn't directly support mutation events, however, it notifies the document when mutations are performed so that the document class do so.
CHANGED, flags, HASDEFAULTS, nodes, ownerNode, READONLY| Modifier | Constructor and Description |
|---|---|
protected |
AttributeMap(ElementImpl ownerNode)
Constructs a named node map.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cloneContent(NamedNodeMapImpl srcmap)
Override parent's method to set the ownerNode correctly
|
NamedNodeMapImpl |
cloneMap(NodeImpl ownerNode)
Cloning a NamedNodeMap is a DEEP OPERATION; it always clones all the nodes
contained in the map.
|
protected Node |
internalRemoveNamedItem(String name,
boolean raiseEx)
Internal removeNamedItem method allowing to specify whether an exception must
be thrown if the specified name is not found.
|
protected Node |
internalRemoveNamedItemNS(String namespaceURI,
String name,
boolean raiseEx)
Internal removeNamedItemNS method allowing to specify whether an exception
must be thrown if the specified local name and namespace URI is not found.
|
protected Node |
removeItem(Node item)
NON-DOM: Remove the node object
NOTE: Specifically removes THIS NODE -- not the node with this name, nor the
node with these contents.
|
Node |
removeNamedItem(String name)
Removes an attribute specified by name.
|
Node |
removeNamedItemNS(String namespaceURI,
String name)
Introduced in DOM Level 2.
|
Node |
setNamedItem(Node arg)
Adds an attribute using its nodeName attribute.
|
Node |
setNamedItemNS(Node arg)
Adds an attribute using its namespaceURI and localName.
|
findNamePoint, findNamePoint, getLength, getNamedItem, getNamedItemNS, item, precedes, removeAll, setOwnerDocumentprotected AttributeMap(ElementImpl ownerNode)
ownerNode - the owner nodepublic Node setNamedItem(Node arg) throws DOMException
setNamedItem in interface NamedNodeMapsetNamedItem in class NamedNodeMapImplarg - An Attr node to store in this map.DOMException - The exception description.NamedNodeMap.setNamedItem(org.w3c.dom.Node)public Node setNamedItemNS(Node arg) throws DOMException
setNamedItemNS in interface NamedNodeMapsetNamedItemNS in class NamedNodeMapImplarg - A node to store in a named node map.DOMExceptionNamedNodeMap.setNamedItem(org.w3c.dom.Node)public Node removeNamedItem(String name) throws DOMException
removeNamedItem in interface NamedNodeMapremoveNamedItem in class NamedNodeMapImplname - The name of a node to remove. 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.DOMException - NOT_FOUND_ERR: Raised if there is no node named name in
the map.protected Node removeItem(Node item) throws DOMException
NOTE: Specifically removes THIS NODE -- not the node with this name, nor the node with these contents. If node does not belong to this named node map, we throw a DOMException.
item - The node to removeDOMException - on errorprotected final Node internalRemoveNamedItem(String name, boolean raiseEx)
name - the maneraiseEx - if true raise an exceptionpublic Node removeNamedItemNS(String namespaceURI, String name) throws DOMException
Removes an attribute specified by local name and namespace URI.
removeNamedItemNS in interface NamedNodeMapremoveNamedItemNS in class NamedNodeMapImplnamespaceURI - The namespace URI of the node to remove. When it is null
or an empty string, this method behaves like
removeNamedItem.name - The local name of the node to remove. If the removed
attribute is known to have a default value, an attribute
immediately appears containing the default value.DOMException - NOT_FOUND_ERR: Raised if there is no node named name in
the map.protected final Node internalRemoveNamedItemNS(String namespaceURI, String name, boolean raiseEx)
namespaceURI - the namespace uriname - the nameraiseEx - if true raise exceptionpublic NamedNodeMapImpl cloneMap(NodeImpl ownerNode)
cloneMap in class NamedNodeMapImplownerNode - the owner nodeprotected void cloneContent(NamedNodeMapImpl srcmap)
cloneContent in class NamedNodeMapImplsrcmap - the source mapCopyright © 2024 HtmlUnit. All rights reserved.