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


對建立XmlNodeList集合之 node 物件的子系所做的變更, 會立即反映在XmlNodeList屬性和方法所傳回的節點中。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支援反復專案和索引存取。XmlNodeList supports iteration and indexed access.

XmlNodeList由下列屬性和方法傳回。XmlNodeList is returned by the following properties and methods.

  • XmlNode.ChildNodes-傳回, 其中包含節點的所有子系。 XmlNodeListXmlNode.ChildNodes - Returns an XmlNodeList containing all the children of the node.

  • XmlNode.SelectNodes-傳回, XmlNodeList其中包含符合 XPath 查詢的節點集合。XmlNode.SelectNodes - Returns an XmlNodeList containing a collection of nodes matching the XPath query.

  • GetElementsByTagName-傳回, 其中包含符合指定名稱之所有子代專案的清單。 XmlNodeListGetElementsByTagName - Returns an XmlNodeList containing a list of all descendant elements that match the specified name. 這個方法在XmlDocumentXmlElement類別中都有提供。This method is available in both the XmlDocument and XmlElement classes.


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

初始化 XmlNodeList 類別的新執行個體。Initializes a new instance of the XmlNodeList class.


Count Count Count Count

取得 XmlNodeList 中的節點數目。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()

取得目前執行個體的 TypeGets 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()

建立目前 Object 的淺層複本 (Shallow Copy)。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)


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

釋放 XmlNodeList 類別所使用的所有資源。Releases all resources used by the XmlNodeList class.


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

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

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

根據指定的型別來篩選 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)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.