Aracılığıyla paylaş


XmlNodeList Class

Definition

Describes a collection of nodes.

public ref class XmlNodeList sealed : IIterable<IXmlNode ^>, IVectorView<IXmlNode ^>
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class XmlNodeList final : IIterable<IXmlNode>, IVectorView<IXmlNode>
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class XmlNodeList : IEnumerable<IXmlNode>, IReadOnlyList<IXmlNode>
Public NotInheritable Class XmlNodeList
Implements IEnumerable(Of IXmlNode), IReadOnlyList(Of IXmlNode)
Inheritance
Object Platform::Object IInspectable XmlNodeList
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

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

Length

Gets the length of the list.

Size

Gets the number of elements in the vector view.

Methods

First()

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

GetAt(UInt32)

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

GetMany(UInt32, IXmlNode[])

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

IndexOf(IXmlNode, UInt32)

Returns the index of a specified item in the vector.

Item(UInt32)

Returns the item in the list at the specified index.

Applies to