Class NamedNodeMap
Namespace: Aspose.Html.Collections
Assembly: Aspose.HTML.dll (25.2.0)
Represents collections of attributes that can be accessed by name.
[DOMName("NamedNodeMap")]
[ComVisible(true)]
[DOMObject]
public class NamedNodeMap : DOMObject, INotifyPropertyChanged
Inheritance
object ← DOMObject ← NamedNodeMap
Implements
Inherited Members
DOMObject.GetPlatformType(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Properties
Length
The number of nodes in this map.
[DOMName("length")]
public int Length { get; }
Property Value
this[int]
Returns the index-th item in the map. If index is greater than or equal to the number of nodes in this map, this returns null.
[DOMName("item")]
public Attr this[int index] { get; }
Property Value
this[string]
Gets the Aspose.Html.Dom.Attr with the specified name.
public Attr this[string name] { get; }
Property Value
Methods
GetNamedItem(string)
Retrieves a node specified by name.
[DOMNamedPropertyGetter]
[DOMName("getNamedItem")]
public Attr GetNamedItem(string name)
Parameters
name
string
The node name.
Returns
Returns node.
GetNamedItemNS(string, string)
Retrieves a node specified by local name and namespace URI.
[DOMName("getNamedItemNS")]
public Attr GetNamedItemNS(string namespaceURI, string localName)
Parameters
namespaceURI
string
The namespace URI.
localName
string
Name of the local.
Returns
Returns node.
RemoveNamedItem(string)
Removes a node specified by name.
[DOMName("removeNamedItem")]
public Attr RemoveNamedItem(string name)
Parameters
name
string
The element name.
Returns
Removed node.
RemoveNamedItemNS(string, string)
Removes a node specified by local name and namespace URI.
[DOMName("removeNamedItemNS")]
public Attr RemoveNamedItemNS(string namespaceURI, string localName)
Parameters
namespaceURI
string
The namespace URI.
localName
string
Name of the local.
Returns
Returns node.
SetNamedItem(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.
[DOMName("setNamedItem")]
public Attr SetNamedItem(Attr attr)
Parameters
attr
Attr
The attribute.
Returns
Returns node.
Exceptions
SetNamedItemNS(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.
[DOMName("setNamedItemNS")]
public Attr SetNamedItemNS(Attr attr)
Parameters
attr
Attr
The attribute.
Returns
Returns node.
Exceptions
See Also
IEnumerable<t> </t>