XmlNodeList XmlNodeList XmlNodeList Class

Definition

Describes a collection of nodes.

public sealed class XmlNodeList : IXmlNodeList, IIterable, IVectorViewpublic sealed class XmlNodeList : IXmlNodeList, IEnumerable, IReadOnlyListPublic NotInheritable Class XmlNodeList Implements IXmlNodeList, IEnumerable, IReadOnlyList
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<T> with an IXmlNode constraint.

Properties

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

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

This member is not implemented in C++T this[int index] { get; }ReadOnly Property Item(index As Integer) As T
Parameters
index
System.Int32 System.Int32 System.Int32

The zero-based index of the element to get.

Value
T T T

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

Attributes

Length Length Length

Gets the length of the list.

public uint Length { get; }public uint Length { get; }Public ReadOnly Property Length As uint
Value
uint uint uint

The length of the list. The range of valid child node indices is 0 to length-1 inclusive.

Attributes

Size Size Size

Gets the number of elements in the vector view.

public uint Size { get; }This member is not implemented in C#This member is not implemented in VB.Net
Value
uint uint uint

The number of elements in the vector view.

Attributes

Methods

First() First() First()

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

public IIterator<IXmlNode> First()This member is not implemented in C#This member is not implemented in VB.Net
Returns

The iterator.

Attributes

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

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

public IXmlNode GetAt(UInt32 index)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
index
System.UInt32 System.UInt32 System.UInt32

The zero-based index of the item in the vector view to return.

Returns

The item in the vector view at the specified index.

Attributes

GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator that iterates through the collection.

This member is not implemented in C++IEnumerator<T> GetEnumerator()Function GetEnumerator As IEnumerator(Of T)
Returns
System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerator<T>

An enumerator that can be used to iterate through the collection.

Attributes
See Also
System.Collections.Generic.IEnumerator<T>System.Collections.Generic.IEnumerator<T>System.Collections.Generic.IEnumerator<T>

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

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

public uint GetMany(UInt32 startIndex, IXmlNode[] items)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
startIndex
System.UInt32 System.UInt32 System.UInt32

The zero-based index of the start of the items in the vector to return.

items
Windows.Data.Xml.Dom.IXmlNode[] Windows.Data.Xml.Dom.IXmlNode[] Windows.Data.Xml.Dom.IXmlNode[]

The items in the vector view that start at startIndex.

Returns
uint uint uint

The number of items returned.

Attributes

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

Returns the index of a specified item in the vector.

public bool IndexOf(IXmlNode value, UInt32 index)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
value
IXmlNode IXmlNode IXmlNode

The item to find in the vector.

index
System.UInt32 System.UInt32 System.UInt32

The zero-based index of the item if found. Zero is returned if the item is not found.

Returns
bool bool bool

TRUE if the item is found; otherwise, FALSE if the item is not found.

Attributes

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

Returns the item in the list at the specified index.

public IXmlNode Item(UInt32 index)public IXmlNode Item(UInt32 index)Public Function Item(index As UInt32) As IXmlNode
Parameters
index
System.UInt32 System.UInt32 System.UInt32

The zero-based index of the requested item.

Returns

The requested item. This method returns NULL if the index is not valid.

Attributes