Table of Contents

Interface INamedNodeMap

Namespace
AngleSharp.Dom
Assembly
AngleSharp.dll

NamedNodeNap is a key/value pair of nodes that can be accessed by numeric or string index. https://dom.spec.whatwg.org/#interface-namednodemap

[DomName("NamedNodeMap")]
public interface INamedNodeMap : IEnumerable<IAttr>, IEnumerable
Inherited Members
Extension Methods

Properties

this[int]

Gets the node at the specified numeric index.

[DomName("item")]
[DomAccessor(Accessors.Getter)]
IAttr? this[int index] { get; }

Parameters

index int

The index of the element.

Property Value

IAttr

The attribute at the specified numeric index.

this[string]

Gets the node with the specified name.

[DomAccessor(Accessors.Getter)]
IAttr? this[string name] { get; }

Parameters

name string

The name of the element.

Property Value

IAttr

The attribute at the specfied name.

Length

Gets the number of nodes in the NamedNodeMap.

[DomName("length")]
int Length { get; }

Property Value

int

The number of nodes in the collection.

Methods

GetNamedItem(string)

Gets a named item in the NamedNodeMap.

[DomName("getNamedItem")]
IAttr? GetNamedItem(string name)

Parameters

name string

The name of the item to get.

Returns

IAttr

The attribute with the given name.

GetNamedItem(string?, string)

Gets a named item in the NamedNodeMap identified by namespace and local name.

[DomName("getNamedItemNS")]
IAttr? GetNamedItem(string? namespaceUri, string localName)

Parameters

namespaceUri string

The namespace of the item.

localName string

The local name of the item.

Returns

IAttr

The attribute with the namespaceUri and name.

RemoveNamedItem(string)

Removes a named item from the NamedNodeMap

[DomName("removeNamedItem")]
IAttr RemoveNamedItem(string name)

Parameters

name string

The named item to remove.

Returns

IAttr

The removed attribute.

RemoveNamedItem(string?, string)

Removes a named item from the NamedNodeMap.

[DomName("removeNamedItemNS")]
IAttr RemoveNamedItem(string? namespaceUri, string localName)

Parameters

namespaceUri string

The namespace of the item.

localName string

The local name of the item.

Returns

IAttr

The removed attribute.

SetNamedItem(IAttr)

Sets a named item in the NamedNodeMap.

[DomName("setNamedItem")]
IAttr? SetNamedItem(IAttr item)

Parameters

item IAttr

The named item to set.

Returns

IAttr

The replaced attribute, if any.

SetNamedItemWithNamespaceUri(IAttr)

Sets a named item in the NamedNodeMap.

[DomName("setNamedItemNS")]
IAttr? SetNamedItemWithNamespaceUri(IAttr item)

Parameters

item IAttr

The named item to set.

Returns

IAttr

The replaced attribute, if any.