Class HTMLCollection

Class HTMLCollection

Namespace: Aspose.Html.Collections
Assembly: Aspose.HTML.dll (25.2.0)

The Aspose.Html.Collections.HTMLCollection represents a generic collection of Aspose.Html.Dom.Element.

[ComVisible(true)]
[DOMName("HTMLCollection")]
[DOMObject]
public abstract class HTMLCollection : DOMObject, INotifyPropertyChanged, IEnumerable<element>, IEnumerable

Inheritance

objectDOMObjectHTMLCollection

Implements

INotifyPropertyChanged, IEnumerable<element>, IEnumerable

Inherited Members

DOMObject.GetPlatformType(), object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

HTMLCollection()

protected HTMLCollection()

Properties

Length

The number of nodes in the list.

[DOMName("length")]
public abstract int Length { get; }

Property Value

int

this[int]

Returns the index-th item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null.

[DOMName("item")]
public abstract Element this[int index] { get; }

Property Value

Element

Methods

GetEnumerator()

Gets the enumerator.

public abstract IEnumerator<element> GetEnumerator()

Returns

IEnumerator<Element&gt;

An System.Collections.IEnumerator object that can be used to iterate through the collection.

GetPlatformType()

This method is used to retrieve ECMAScript object System.Type.

public override Type GetPlatformType()

Returns

Type

The ECMAScript object System.Type.

NamedItem(string)

Returns the item in the collection matched specified name.

[DOMName("namedItem")]
[DOMNullable]
public Element NamedItem(string name)

Parameters

name string

The element name.

Returns

Element

The matched element

See Also

IEnumerable<t>, IEnumerable<t>, IDisposable </t></t></element>