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
繼承
XmlNodeListXmlNodeListXmlNodeListXmlNodeList
實作

備註

變更節點的項目子系物件XmlNodeList建立集合從傳回的節點中會立即反映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 -傳回XmlNodeList包含節點的所有子系。XmlNode.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 -傳回XmlNodeList包含清單的所有子系的項目符合指定的名稱。GetElementsByTagName - 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.

Extension Methods

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)

將轉換IEnumerableIQueryableConverts an IEnumerable to an IQueryable.

適用於

另請參閱