Class NamedNodeMap

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

objectDOMObjectNamedNodeMap

Implements

INotifyPropertyChanged

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

int

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

Attr

this[string]

Gets the Aspose.Html.Dom.Attr with the specified name.

public Attr this[string name] { get; }

Property Value

Attr

Methods

GetNamedItem(string)

Retrieves a node specified by name.

[DOMNamedPropertyGetter]
[DOMName("getNamedItem")]
public Attr GetNamedItem(string name)

Parameters

name string

The node name.

Returns

Attr

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

Attr

Returns node.

RemoveNamedItem(string)

Removes a node specified by name.

[DOMName("removeNamedItem")]
public Attr RemoveNamedItem(string name)

Parameters

name string

The element name.

Returns

Attr

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

Attr

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

Attr

Returns node.

Exceptions

DOMException

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

Attr

Returns node.

Exceptions

DOMException

See Also

IEnumerable<t> </t>