Visual Basic (LINQ to XML 中的語言整合軸) Language-integrated axes in Visual Basic (LINQ to XML)

軸功能已整合至 Visual Basic,可讓您輕鬆地存取 XML。Axis features are integrated into Visual Basic, making it easy to access XML. LINQ to XML 檔中的許多範例都會使用這些功能,如下清單格中所列的文章所述:Many of the examples in the LINQ to XML documentation use these features, which are described in the articles listed in this table:

發行項Article 描述Description
XML Child Axis PropertyXML Child Axis Property 提供下列任一項目之子系的存取:XElement 物件、XDocument 物件、XElement 物件的集合,或是 XDocument 物件的集合。Provides access to the children of one of the following: an XElement object, an XDocument object, a collection of XElement objects, or a collection of XDocument objects. 這個座標軸等同於 Elements 座標軸。This axis is equivalent to the Elements axis.
XML Descendant Axis PropertyXML Descendant Axis Property 提供下列任一項目之子系的存取:XElement 物件、XDocument 物件、XElement 物件的集合。Provides access to the descendants of the following: an XElement object, an XDocument object, or a collection of XElement objects. 這個座標軸等同於 Descendants 座標軸。This axis is equivalent to the Descendants axis.
XML Attribute Axis PropertyXML Attribute Axis Property 提供 XElement 物件之屬性的存取。Provides access to an attribute of an XElement object. 這個座標軸大致等同於 Attribute 座標軸。This axis is roughly equivalent to the Attribute axis. 這個座標軸與 Attribute 座標軸不同之處在於,前者會傳回屬性的值,而非 XAttribute 物件的值。This axis differs from the Attribute axis in that it returns the value of the attribute, not an XAttribute object.
擴充索引子屬性Extension Indexer Property 提供集合中個別項目的存取。Provides access to individual elements in a collection.

另請參閱See also