XmlNodeList XmlNodeList XmlNodeList XmlNodeList Class


Represents an ordered collection of nodes.

public ref class XmlNodeList abstract : IDisposable, System::Collections::IEnumerable
public abstract class XmlNodeList : IDisposable, System.Collections.IEnumerable
type XmlNodeList = class
    interface IEnumerable
    interface IDisposable
Public MustInherit Class XmlNodeList
Implements IDisposable, IEnumerable


Changes to the children of the node object that the XmlNodeList collection was created from are immediately reflected in the nodes returned by the XmlNodeList properties and methods. XmlNodeList supports iteration and indexed access.

XmlNodeList is returned by the following properties and methods.

  • XmlNode.ChildNodes - Returns an XmlNodeList containing all the children of the node.

  • XmlNode.SelectNodes - Returns an XmlNodeList containing a collection of nodes matching the XPath query.

  • GetElementsByTagName - Returns an XmlNodeList containing a list of all descendant elements that match the specified name. This method is available in both the XmlDocument and XmlElement classes.


XmlNodeList() XmlNodeList() XmlNodeList() XmlNodeList()

Initializes a new instance of the XmlNodeList class.


Count Count Count Count

Gets the number of nodes in the XmlNodeList.

ItemOf[Int32] ItemOf[Int32] ItemOf[Int32] ItemOf[Int32]

Gets a node at the given index.


Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Gets an enumerator that iterates through the collection of nodes.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
Item(Int32) Item(Int32) Item(Int32) Item(Int32)

Retrieves a node at the given index.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
PrivateDisposeNodeList() PrivateDisposeNodeList() PrivateDisposeNodeList() PrivateDisposeNodeList()

Disposes resources in the node list privately.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose()

Releases all resources used by the XmlNodeList class.

Extension Methods

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to