XmlNodeList XmlNodeList XmlNodeList XmlNodeList XmlNodeList Class

Definition

Describes a collection of nodes.

public : sealed class XmlNodeList : IXmlNodeList, IIterable<IXmlNode>, IVectorView<IXmlNode>
struct winrt::Windows::Data::Xml::Dom::XmlNodeList : IXmlNodeList, IIterable<IXmlNode>, IVectorView<IXmlNode>
public sealed class XmlNodeList : IXmlNodeList, IEnumerable<IXmlNode>, IReadOnlyList<IXmlNode>
Public NotInheritable Class XmlNodeList Implements IXmlNodeList, IEnumerable<IXmlNode>, IReadOnlyList<IXmlNode>
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Collection member lists

For JavaScript, XmlNodeList has the members shown in the member lists. In addition, XmlNodeList supports members of Array.prototype and using an index to access items.

Enumerating the collection in C# or Microsoft Visual Basic

XmlNodeList is enumerable, so you can use language-specific syntax such as foreach in C# to enumerate the items in the collection. The compiler does the type-casting for you and you won't need to cast to IEnumerable<IXmlNode> explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast to IEnumerable with an IXmlNode constraint.

Properties

Item[Int32] Item[Int32] Item[Int32] Item[Int32] Item[Int32]

Gets the element at the specified index in the read-only list.

Length Length Length Length Length

Gets the length of the list.

Size Size Size Size Size

Gets the number of elements in the vector view.

Methods

First() First() First() First() First()

Returns an iterator that iterates over the items in the collection.

GetAt(UInt32) GetAt(UInt32) GetAt(UInt32) GetAt(UInt32) GetAt(UInt32)

Returns the item at the specified index in the vector view.

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator that iterates through the collection.

GetMany(UInt32, IXmlNode[]) GetMany(UInt32, IXmlNode[]) GetMany(UInt32, IXmlNode[]) GetMany(UInt32, IXmlNode[]) GetMany(UInt32, IXmlNode[])

Returns the items that start at the specified index of the vector view.

IndexOf(IXmlNode, UInt32) IndexOf(IXmlNode, UInt32) IndexOf(IXmlNode, UInt32) IndexOf(IXmlNode, UInt32) IndexOf(IXmlNode, UInt32)

Returns the index of a specified item in the vector.

Item(UInt32) Item(UInt32) Item(UInt32) Item(UInt32) Item(UInt32)

Returns the item in the list at the specified index.