@DOMObjectAttribute @DOMNameAttribute(name="NamedNodeMap") @DOMIndexerAttribute(indexerType="Attr") public class NamedNodeMap extends DOMObject implements com.aspose.html.internal.ms.System.Collections.Generic.IGenericEnumerable<Attr>, IDOMCollectionIndexer<Attr>, com.aspose.html.common.IObservable<Attr>, com.aspose.html.internal.ms.System.IDisposable
Represents collections of attributes that can be accessed by name.
System.Collections.Generic.IEnumerable{Attr}
PropertyChanged
Constructor and Description |
---|
NamedNodeMap(Element element)
Initializes a new instance of the
NamedNodeMap class. |
Modifier and Type | Method and Description |
---|---|
static void |
append(Attr attr,
Element element) |
static boolean |
contains(Element element,
Attr attr) |
void |
dispose() |
Attr |
get_Item(int index)
Returns the indexth item in the map.
|
Attr |
get_Item(String name)
Gets the
Attr with the specified name. |
static Attr |
getAttribute(String qualifiedName,
Element element) |
static Attr |
getAttribute(String namespace,
String localName,
Element element) |
static String |
getAttributeValue(Element element,
String namespace,
String localName) |
int |
getLength()
The number of nodes in this map.
|
Attr |
getNamedItem(String name)
Retrieves a node specified by name.
|
Attr |
getNamedItemNS(String namespaceURI,
String localName)
Retrieves a node specified by local name and namespace URI.
|
com.aspose.html.internal.ms.System.Collections.Generic.IGenericEnumerator<Attr> |
iterator()
Returns an enumerator that iterates through the collection.
|
void |
notifyAttributeChanged(Attr attr) |
static void |
remove(Attr attr,
Element element) |
static Attr |
removeAttribute(String qualifiedName,
Element element) |
static Attr |
removeAttribute(String namespace,
String localName,
Element element) |
Attr |
removeNamedItem(String name)
Removes a node specified by name.
|
Attr |
removeNamedItemNS(String namespaceURI,
String localName)
Removes a node specified by local name and namespace URI.
|
static void |
replace(Attr oldAttr,
Attr newAttr,
Element element) |
static Attr |
setAttribute(Attr attr,
Element element) |
static void |
setAttribute(Element element,
String localName,
String value,
String prefix,
String namespace) |
Attr |
setNamedItem(Attr attr)
Adds a node using its nodeName attribute.
|
Attr |
setNamedItemNS(Attr attr)
Adds a node using its namespaceURI and localName.
|
com.aspose.html.internal.ms.System.IDisposable |
subscribe(com.aspose.html.common.IObserver<Attr> observer)
Returns an enumerator that iterates through a collection.
|
fireNotifyPropertyChanged, getCurrentValues, getRuntimesBinding, setCurrentValues, setField, setRuntimesBinding
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public NamedNodeMap(Element element)
Initializes a new instance of the NamedNodeMap
class.
element
- The element.public static Attr removeAttribute(String namespace, String localName, Element element)
public static String getAttributeValue(Element element, String namespace, String localName)
public static void setAttribute(Element element, String localName, String value, String prefix, String namespace)
@DOMNameAttribute(name="length") public int getLength()
The number of nodes in this map.
@DOMNameAttribute(name="item") public Attr get_Item(int index)
Returns the indexth item in the map. If index is greater than or equal to the number of nodes in this map, this returns null.
get_Item
in interface IDOMCollectionIndexer<Attr>
index
- The index.
Value:
The Attr
.public Attr get_Item(String name)
Gets the Attr
with the specified name.
name
- The attribute name.
Value:
The Attr
.@DOMNameAttribute(name="getNamedItem") public Attr getNamedItem(String name)
Retrieves a node specified by name.
name
- The node name.@DOMNameAttribute(name="getNamedItemNS") public Attr getNamedItemNS(String namespaceURI, String localName)
Retrieves a node specified by local name and namespace URI.
namespaceURI
- The namespace URI.localName
- Name of the local.@DOMNameAttribute(name="setNamedItem") public Attr setNamedItem(Attr attr)
Adds a node using its nodeName attribute. If a node with that name is already present in this map, it is replaced by the new one. Replacing a node by itself has no effect.
attr
- The attribute.DOMException
@DOMNameAttribute(name="setNamedItemNS") public Attr setNamedItemNS(Attr attr)
Adds a node using its namespaceURI and localName. If a node with that namespace URI and that local name is already present in this map, it is replaced by the new one. Replacing a node by itself has no effect.
attr
- The attribute.DOMException
@DOMNameAttribute(name="removeNamedItem") public Attr removeNamedItem(String name)
Removes a node specified by name.
name
- The element name.@DOMNameAttribute(name="removeNamedItemNS") public Attr removeNamedItemNS(String namespaceURI, String localName)
Removes a node specified by local name and namespace URI.
namespaceURI
- The namespace URI.localName
- Name of the local.public com.aspose.html.internal.ms.System.Collections.Generic.IGenericEnumerator<Attr> iterator()
Returns an enumerator that iterates through the collection.
iterator
in interface com.aspose.html.internal.ms.System.Collections.Generic.IGenericEnumerable<Attr>
iterator
in interface com.aspose.html.internal.ms.System.Collections.IEnumerable<Attr>
iterator
in interface Iterable<Attr>
System.Collections.Generic.IEnumerator`1
that can be used to iterate through the collection.public com.aspose.html.internal.ms.System.IDisposable subscribe(com.aspose.html.common.IObserver<Attr> observer)
Returns an enumerator that iterates through a collection.
subscribe
in interface com.aspose.html.common.IObservable<Attr>
observer
- The object that is to receive notifications.IEnumerator
object that can be used to iterate through the collection.public void notifyAttributeChanged(Attr attr)
public void dispose()
dispose
in interface com.aspose.html.internal.ms.System.IDisposable