Edit

Bagikan melalui


XmlNodeList Class

Definition

Represents an ordered collection of nodes.

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

Remarks

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.

Constructors

XmlNodeList()

Initializes a new instance of the XmlNodeList class.

Properties

Count

Gets the number of nodes in the XmlNodeList.

ItemOf[Int32]

Gets a node at the given index.

Methods

Equals(Object)

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

(Inherited from Object)
GetEnumerator()

Gets an enumerator that iterates through the collection of nodes.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
Item(Int32)

Retrieves a node at the given index.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
PrivateDisposeNodeList()

Disposes resources in the node list privately.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

IDisposable.Dispose()

Releases all resources used by the XmlNodeList class.

Extension Methods

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to

See also