diff --git a/.openpublishing.redirection.json b/.openpublishing.redirection.json index ef05306652910..61d5215d5ab0a 100644 --- a/.openpublishing.redirection.json +++ b/.openpublishing.redirection.json @@ -1441,6 +1441,9 @@ { "source_path": "docs/csharp/programming-guide/concepts/linq/serializing-with-an-xml-declaration.md", "redirect_url": "/dotnet/standard/linq/serialize-xml-declaration", + "redirect_document_id": true + }, + { "source_path": "docs/csharp/programming-guide/concepts/linq/how-to-chain-axis-method-calls-linq-to-xml.md", "redirect_url": "/dotnet/standard/linq/chain-axis-method-calls", "redirect_document_id": true @@ -1480,6 +1483,16 @@ "redirect_url": "/dotnet/standard/linq/retrieve-value-attribute", "redirect_document_id": true }, + { + "source_path": "docs/csharp/programming-guide/concepts/linq/how-to-find-an-element-with-a-specific-attribute.md", + "redirect_url": "/dotnet/standard/linq/find-element-specific-attribute", + "redirect_document_id": true + }, + { + "source_path": "docs/csharp/programming-guide/concepts/linq//how-to-retrieve-the-shallow-value-of-an-element.md", + "redirect_url": "/dotnet/standard/linq/retrieve-shallow-value-element", + "redirect_document_id": true + }, { "source_path": "docs/csharp/programming-guide/concepts/threading/how-to-use-a-thread-pool.md", "redirect_url": "/dotnet/api/system.threading.threadpool.queueuserworkitem" @@ -4636,6 +4649,9 @@ { "source_path": "docs/visual-basic/programming-guide/concepts/linq/serializing-with-an-xml-declaration.md", "redirect_url": "/dotnet/standard/linq/serialize-xml-declaration", + "redirect_document_id": false + }, + { "source_path": "docs/visual-basic/programming-guide/concepts/linq/how-to-chain-axis-method-calls-linq-to-xml.md", "redirect_url": "/dotnet/standard/linq/chain-axis-method-calls", "redirect_document_id": false @@ -4675,6 +4691,26 @@ "redirect_url": "/dotnet/standard/linq/retrieve-value-attribute", "redirect_document_id": false }, + { + "source_path": "docs/visual-basic/programming-guide/concepts/linq/how-to-find-an-element-with-a-specific-attribute.md", + "redirect_url": "/dotnet/standard/linq/find-element-specific-attribute", + "redirect_document_id": false + }, + { + "source_path": "docs/visual-basic/programming-guide/concepts/linq//how-to-retrieve-the-shallow-value-of-an-element.md", + "redirect_url": "/dotnet/standard/linq/retrieve-shallow-value-element", + "redirect_document_id": false + }, + { + "source_path": "docs/visual-basic/programming-guide/concepts/linq/language-integrated-axes.md", + "redirect_url": "/dotnet/standard/linq/language-integrated-axes", + "redirect_document_id": false + }, + { + "source_path": "docs/visual-basic/programming-guide/concepts/linq/querying-xml-trees.md", + "redirect_url": "/dotnet/standard/linq/query-xml-trees-overview", + "redirect_document_id": false + }, { "source_path": "docs/visual-basic/programming-guide/concepts/threading/how-to-use-a-thread-pool.md", "redirect_url": "/dotnet/api/system.threading.threadpool.queueuserworkitem" diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-find-an-element-with-a-specific-attribute.md b/docs/csharp/programming-guide/concepts/linq/how-to-find-an-element-with-a-specific-attribute.md deleted file mode 100644 index 491553796fc37..0000000000000 --- a/docs/csharp/programming-guide/concepts/linq/how-to-find-an-element-with-a-specific-attribute.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -title: "How to find an element with a specific attribute (C#)" -ms.date: 07/20/2015 -ms.assetid: b92591aa-3cfb-490e-99f6-da8de335e362 ---- -# How to find an element with a specific attribute (C#) -This topic shows how to find an element that has an attribute that has a specific value. - -## Example - The example shows how to find the `Address` element that has a `Type` attribute with a value of "Billing". - - This example uses the following XML document: [Sample XML File: Typical Purchase Order (LINQ to XML)](./sample-xml-file-typical-purchase-order-linq-to-xml-1.md). - -```csharp -XElement root = XElement.Load("PurchaseOrder.xml"); -IEnumerable address = - from el in root.Elements("Address") - where (string)el.Attribute("Type") == "Billing" - select el; -foreach (XElement el in address) - Console.WriteLine(el); -``` - - This code produces the following output: - -```xml -
- Tai Yee - 8 Oak Avenue - Old Town - PA - 95819 - USA -
-``` - -## Example - The following example shows the same query for XML that is in a namespace. For more information, see [Namespaces Overview (LINQ to XML) (C#)](namespaces-overview-linq-to-xml.md). - - This example uses the following XML document: [Sample XML File: Typical Purchase Order in a Namespace](./sample-xml-file-typical-purchase-order-in-a-namespace.md). - -```csharp -XElement root = XElement.Load("PurchaseOrderInNamespace.xml"); -XNamespace aw = "http://www.adventure-works.com"; -IEnumerable address = - from el in root.Elements(aw + "Address") - where (string)el.Attribute(aw + "Type") == "Billing" - select el; -foreach (XElement el in address) - Console.WriteLine(el); -``` - - This code produces the following output: - -```xml - - Tai Yee - 8 Oak Avenue - Old Town - PA - 95819 - USA - -``` - -## See also - -- -- -- [Standard Query Operators Overview (C#)](./standard-query-operators-overview.md) -- [Projection Operations (C#)](./projection-operations.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-retrieve-the-shallow-value-of-an-element.md b/docs/csharp/programming-guide/concepts/linq/how-to-retrieve-the-shallow-value-of-an-element.md deleted file mode 100644 index 3cba940214597..0000000000000 --- a/docs/csharp/programming-guide/concepts/linq/how-to-retrieve-the-shallow-value-of-an-element.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: "How to retrieve the shallow value of an element (C#)" -ms.date: 07/20/2015 -ms.assetid: 924a2699-72f6-4be1-aaa6-de62f8ec73b9 ---- -# How to retrieve the shallow value of an element (C#) -This topic shows how to get the shallow value of an element. The shallow value is the value of the specific element only, as opposed to the deep value, which includes the values of all descendent elements concatenated into a single string. - - When you retrieve an element value by using either casting or the property, you retrieve the deep value. To retrieve the shallow value, you can use the `ShallowValue` extension method, as shown in the following example. Retrieving the shallow value is useful when you want to select elements based on their content. - - The following example declares an extension method that retrieves the shallow value of an element. It then uses the extension method in a query to list all elements that contain a calculated value. - -## Example - The following text file, Report.xml, is the source for this example. - -```xml - - -
- - =Customer.CustomerId.Heading - =Customer.Name.Heading - - - =Customer.CustomerId - =Customer.Name - -
-
-``` - -```csharp -public static class MyExtensions -{ - public static string ShallowValue(this XElement xe) - { - return xe - .Nodes() - .OfType() - .Aggregate(new StringBuilder(), - (s, c) => s.Append(c), - s => s.ToString()); - } -} - -class Program -{ - static void Main(string[] args) - { - XElement root = XElement.Load("Report.xml"); - - IEnumerable query = from el in root.Descendants() - where el.ShallowValue().StartsWith("=") - select el; - - foreach (var q in query) - { - Console.WriteLine("{0}{1}{2}", - q.Name.ToString().PadRight(8), - q.Attribute("Name").ToString().PadRight(20), - q.ShallowValue()); - } - } -} -``` - - This example produces the following output: - -```output -Column Name="CustomerId" =Customer.CustomerId.Heading -Column Name="Name" =Customer.Name.Heading -Column Name="CustomerId" =Customer.CustomerId -Column Name="Name" =Customer.Name -``` - -## See also - -- [LINQ to XML Axes (C#)](./linq-to-xml-axes-overview.md) diff --git a/docs/standard/linq/find-element-specific-attribute.md b/docs/standard/linq/find-element-specific-attribute.md new file mode 100644 index 0000000000000..e249b371f9964 --- /dev/null +++ b/docs/standard/linq/find-element-specific-attribute.md @@ -0,0 +1,107 @@ +--- +title: How to find an element with a specific attribute - LINQ to XML +ms.date: 07/20/2015 +dev_langs: + - "csharp" + - "vb" +ms.assetid: b92591aa-3cfb-490e-99f6-da8de335e362 +--- + +# How to find an element with a specific attribute (LINQ to XML) + +This article provides examples of how to find an element whose attribute has a specific value. + +## Example: Find an element whose attribute has a specific value + +The following example shows how to find the `Address` element that has a `Type` attribute with a value of "Billing". The example uses XML document [Sample XML file: Typical purchase order](sample-xml-file-typical-purchase-order.md). + +```csharp +XElement root = XElement.Load("PurchaseOrder.xml"); +IEnumerable address = + from el in root.Elements("Address") + where (string)el.Attribute("Type") == "Billing" + select el; +foreach (XElement el in address) + Console.WriteLine(el); +``` + +```vb +Dim root As XElement = XElement.Load("PurchaseOrder.xml") +Dim address As IEnumerable(Of XElement) = _ + From el In root.
_ + Where el.@Type = "Billing" _ + Select el +For Each el As XElement In address + Console.WriteLine(el) +Next +``` + +The example produces this output: + +```xml +
+ Tai Yee + 8 Oak Avenue + Old Town + PA + 95819 + USA +
+``` + +## Example: Find an element in XML that is in a namespace + +The following example shows the same query, but for XML that is in a namespace. It uses XML document [Sample XML file: typical purchase order in a namespace](sample-xml-file-typical-purchase-order-namespace.md). + +For more information about namespaces, see [Namespaces overview](namespaces-overview.md). + +```csharp +XElement root = XElement.Load("PurchaseOrderInNamespace.xml"); +XNamespace aw = "http://www.adventure-works.com"; +IEnumerable address = + from el in root.Elements(aw + "Address") + where (string)el.Attribute(aw + "Type") == "Billing" + select el; +foreach (XElement el in address) + Console.WriteLine(el); +``` + +```vb +Imports + +Module Module1 + Sub Main() + Dim root As XElement = XElement.Load("PurchaseOrderInNamespace.xml") + Dim address As IEnumerable(Of XElement) = _ + From el In root. _ + Where el.@aw:Type = "Billing" _ + Select el + For Each el As XElement In address + Console.WriteLine(el) + Next + End Sub +End Module +``` + +The example produces this output:: + +```xml + + Tai Yee + 8 Oak Avenue + Old Town + PA + 95819 + USA + +``` + +## See also + +- +- +- [Standard Query Operators Overview (C#)](../../csharp/programming-guide/concepts/linq/standard-query-operators-overview.md) +- [Projection Operations (C#)](../../csharp/programming-guide/concepts/linq/projection-operations.md) +- [Basic Queries (LINQ to XML) (Visual Basic)](../../visual-basic/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) +- [Standard Query Operators Overview (Visual Basic)](../../visual-basic/programming-guide/concepts/linq/standard-query-operators-overview.md) +- [Projection Operations (Visual Basic)](../../visual-basic/programming-guide/concepts/linq/projection-operations.md) diff --git a/docs/standard/linq/language-integrated-axes.md b/docs/standard/linq/language-integrated-axes.md new file mode 100644 index 0000000000000..5b0ac0d5bf62f --- /dev/null +++ b/docs/standard/linq/language-integrated-axes.md @@ -0,0 +1,21 @@ +--- +title: "Language-integrated axes in Visual Basic - LINQ to XML" +description: LINQ to XML provides easy access to XML using the axes integrated into Visual Basic +ms.date: 07/20/2015 +ms.assetid: d450a556-a134-4261-b011-44e399660894 +--- + +# Language-integrated axes in Visual Basic (LINQ to XML) + +Axis features are integrated into Visual Basic, making it easy to access 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 Property](../../visual-basic/language-reference/xml-axis/xml-child-axis-property.md)|Provides access to the children of one of the following: an object, an object, a collection of objects, or a collection of objects. This axis is equivalent to the axis.| +|[XML Descendant Axis Property](../../visual-basic/language-reference/xml-axis/xml-descendant-axis-property.md)|Provides access to the descendants of the following: an object, an object, or a collection of objects. This axis is equivalent to the axis.| +|[XML Attribute Axis Property](../../visual-basic/language-reference/xml-axis/xml-attribute-axis-property.md)|Provides access to an attribute of an object. This axis is roughly equivalent to the axis. This axis differs from the axis in that it returns the value of the attribute, not an object.| +|[Extension Indexer Property](../../visual-basic/language-reference/xml-axis/extension-indexer-property.md)|Provides access to individual elements in a collection.| + +## See also + +- [LINQ to XML axes overview](linq-xml-axes-overview.md) diff --git a/docs/standard/linq/query-xml-trees-overview.md b/docs/standard/linq/query-xml-trees-overview.md new file mode 100644 index 0000000000000..f77393f114d26 --- /dev/null +++ b/docs/standard/linq/query-xml-trees-overview.md @@ -0,0 +1,35 @@ +--- +title: Query XML trees overview - LINQ to XML +ms.date: 07/20/2015 +ms.assetid: 2e35c1ab-08c8-4378-9ca8-8ff344756eda +--- + +# Query XML trees overview (LINQ to XML) + +After you've instantiated an XML tree, writing queries is the most effective way to extract data from the tree. Also, querying combined with functional construction enables you to generate a new XML document that has a different shape from the original document. + +For background information about LINQ queries, see: + +- [Introduction to LINQ Queries (C#)](../../csharp/programming-guide/concepts/linq/introduction-to-linq-queries.md) +- [Writing Your First LINQ Query (Visual Basic)](../../visual-basic/programming-guide/concepts/linq/writing-your-first-linq-query.md) + +## In this section + +This section of articles provides information, including examples, about LINQ to XML queries. It comprises the following subsections: + +|Topic|Description| +|-----------|-----------------| +|[Basic queries](find-element-specific-attribute.md)|Provides common examples of querying XML trees.| +|[Projections and transformations](work-dictionaries-linq-xml.md)|Provides common examples of projecting from and transforming XML trees.| +|[Advanced query techniques](join-two-collections.md)|Provides query techniques that are useful in more advanced scenarios.| +|[LINQ to XML for XPath users](comparison-xpath-linq-xml.md)|Presents a number of XPath expressions and their LINQ to XML equivalents.| +|[Pure functional transformations of XML](pure-functional-transformations.md)|Presents a small tutorial on writing queries in the style of functional programming.| + +## See also + +- [Language-Integrated Query (LINQ) (C#)](../../csharp/programming-guide/concepts/linq/index.md) +- [Introduction to LINQ Queries (C#)](../../csharp/programming-guide/concepts/linq/introduction-to-linq-queries.md) +- [LINQ in Visual Basic](../../visual-basic/programming-guide/language-features/linq/index.md) +- [Language-Integrated Query (LINQ) (Visual Basic)](../../visual-basic/programming-guide/concepts/linq/index.md) +- [Getting Started with LINQ in Visual Basic](../../visual-basic/programming-guide/concepts/linq/getting-started-with-linq.md) +- [Writing Your First LINQ Query (Visual Basic)](../../visual-basic/programming-guide/concepts/linq/writing-your-first-linq-query.md) diff --git a/docs/standard/linq/retrieve-shallow-value-element.md b/docs/standard/linq/retrieve-shallow-value-element.md new file mode 100644 index 0000000000000..dc4b66d35dd49 --- /dev/null +++ b/docs/standard/linq/retrieve-shallow-value-element.md @@ -0,0 +1,114 @@ +--- +title: How to retrieve the shallow value of an element - LINQ to XML +description: Use the `ShallowValue` extension method to retrieve the shallow value of an element. The shallow value is the value of that element only; that is, it does not include the values of descendant elements. +ms.date: 07/20/2015 +dev_langs: + - "csharp" + - "vb" +ms.assetid: 924a2699-72f6-4be1-aaa6-de62f8ec73b9 +--- +# How to retrieve the shallow value of an element (LINQ to XML) + +This topic shows how to retrieve the shallow value of an element, which is the value of that element only, not including values of descendent elements. Retrieving the shallow value is useful when you want to select elements based on their content. + +When you use casting or the property to retrieve an element value, the value includes the descendants. To retrieve the shallow value you can use the `ShallowValue` extension method, as shown in the following example. The example declares an extension method that retrieves the shallow value of an element. It then uses the extension method in a query to list all elements that contain a calculated value. + +## Example: Use the `ShallowValue` extension method to retrieve the shallow value of an element + +The examples uses the text file Report.xml that contains the following: + +```xml + + +
+ + =Customer.CustomerId.Heading + =Customer.Name.Heading + + + =Customer.CustomerId + =Customer.Name + +
+
+``` + +Here is the code for the example: + +```csharp +public static class MyExtensions +{ + public static string ShallowValue(this XElement xe) + { + return xe + .Nodes() + .OfType() + .Aggregate(new StringBuilder(), + (s, c) => s.Append(c), + s => s.ToString()); + } +} + +class Program +{ + static void Main(string[] args) + { + XElement root = XElement.Load("Report.xml"); + + IEnumerable query = from el in root.Descendants() + where el.ShallowValue().StartsWith("=") + select el; + + foreach (var q in query) + { + Console.WriteLine("{0}{1}{2}", + q.Name.ToString().PadRight(8), + q.Attribute("Name").ToString().PadRight(20), + q.ShallowValue()); + } + } +} +``` + +```vb +Module Module1 + _ + Public Function ShallowValue(ByVal xe As XElement) + Return xe _ + .Nodes() _ + .OfType(Of XText)() _ + .Aggregate(New StringBuilder(), _ + Function(s, c) s.Append(c), _ + Function(s) s.ToString()) + End Function + + Sub Main() + Dim root As XElement = XElement.Load("Report.xml") + + Dim query As IEnumerable(Of XElement) = _ + From el In root.Descendants() _ + Where (el.ShallowValue().StartsWith("=")) _ + Select el + + For Each q As XElement In query + Console.WriteLine("{0}{1}{2}", _ + q.Name.ToString().PadRight(8), _ + q.Attribute("Name").ToString().PadRight(20), _ + q.ShallowValue()) + Next + End Sub +End Module +``` + +The example produces this output: + +```output +Column Name="CustomerId" =Customer.CustomerId.Heading +Column Name="Name" =Customer.Name.Heading +Column Name="CustomerId" =Customer.CustomerId +Column Name="Name" =Customer.Name +``` + +## See also + +- [LINQ to XML axes overview](linq-xml-axes-overview.md) diff --git a/docs/visual-basic/programming-guide/concepts/linq/how-to-find-an-element-with-a-specific-attribute.md b/docs/visual-basic/programming-guide/concepts/linq/how-to-find-an-element-with-a-specific-attribute.md deleted file mode 100644 index 437c2464e87ce..0000000000000 --- a/docs/visual-basic/programming-guide/concepts/linq/how-to-find-an-element-with-a-specific-attribute.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -title: "How to: Find an Element with a Specific Attribute" -ms.date: 07/20/2015 -ms.assetid: 59fb7c19-d42f-40eb-8cf8-f1d5b9658eb7 ---- -# How to: Find an Element with a Specific Attribute (Visual Basic) -This topic shows how to find an element that has an attribute that has a specific value. - -## Example - The example shows how to find the `Address` element that has a `Type` attribute with a value of "Billing". - - This example uses the following XML document: [Sample XML File: Typical Purchase Order (LINQ to XML)](../../../../visual-basic/programming-guide/concepts/linq/sample-xml-file-typical-purchase-order-linq-to-xml.md). - -```vb -Dim root As XElement = XElement.Load("PurchaseOrder.xml") -Dim address As IEnumerable(Of XElement) = _ - From el In root.
_ - Where el.@Type = "Billing" _ - Select el -For Each el As XElement In address - Console.WriteLine(el) -Next -``` - - This code produces the following output: - -```xml -
- Tai Yee - 8 Oak Avenue - Old Town - PA - 95819 - USA -
-``` - - Note that this example uses the [XML Child axis property](../../../../visual-basic/language-reference/xml-axis/xml-child-axis-property.md), the [XML Attribute axis property](../../../../visual-basic/language-reference/xml-axis/xml-attribute-axis-property.md), and the [XML Value property](../../../../visual-basic/language-reference/xml-axis/xml-value-property.md). - -## Example - The following example shows the same query for XML that is in a namespace. For more information, see [Namespaces Overview (LINQ to XML) (Visual Basic)](namespaces-overview-linq-to-xml.md). - - This example uses the following XML document: [Sample XML File: Typical Purchase Order in a Namespace](../../../../visual-basic/programming-guide/concepts/linq/sample-xml-file-typical-purchase-order-in-a-namespace.md). - -```vb -Imports - -Module Module1 - Sub Main() - Dim root As XElement = XElement.Load("PurchaseOrderInNamespace.xml") - Dim address As IEnumerable(Of XElement) = _ - From el In root. _ - Where el.@aw:Type = "Billing" _ - Select el - For Each el As XElement In address - Console.WriteLine(el) - Next - End Sub -End Module -``` - - This code produces the following output: - -```xml - - Tai Yee - 8 Oak Avenue - Old Town - PA - 95819 - USA - -``` - -## See also - -- -- -- [Basic Queries (LINQ to XML) (Visual Basic)](../../../../visual-basic/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) -- [Standard Query Operators Overview (Visual Basic)](../../../../visual-basic/programming-guide/concepts/linq/standard-query-operators-overview.md) -- [Projection Operations (Visual Basic)](../../../../visual-basic/programming-guide/concepts/linq/projection-operations.md) diff --git a/docs/visual-basic/programming-guide/concepts/linq/how-to-retrieve-the-shallow-value-of-an-element.md b/docs/visual-basic/programming-guide/concepts/linq/how-to-retrieve-the-shallow-value-of-an-element.md deleted file mode 100644 index 3f7781927180a..0000000000000 --- a/docs/visual-basic/programming-guide/concepts/linq/how-to-retrieve-the-shallow-value-of-an-element.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: "How to: Retrieve the Shallow Value of an Element" -ms.date: 07/20/2015 -ms.assetid: 730a6670-fb8c-41fc-8a1b-eb97a837e432 ---- - -# How to: Retrieve the Shallow Value of an Element (Visual Basic) - -This topic shows how to get the shallow value of an element. The shallow value is the value of the specific element only, as opposed to the deep value, which includes the values of all descendent elements concatenated into a single string. - -When you retrieve an element value by using either casting or the property, you retrieve the deep value. To retrieve the shallow value, you can use the `ShallowValue` extension method, as shown in the following example. Retrieving the shallow value is useful when you want to select elements based on their content. - -The following example declares an extension method that retrieves the shallow value of an element. It then uses the extension method in a query to list all elements that contain a calculated value. - -## Example - -The following text file, Report.xml, is the source for this example. - -```xml - - -
- - =Customer.CustomerId.Heading - =Customer.Name.Heading - - - =Customer.CustomerId - =Customer.Name - -
-
-``` - -```vb -Module Module1 - _ - Public Function ShallowValue(ByVal xe As XElement) - Return xe _ - .Nodes() _ - .OfType(Of XText)() _ - .Aggregate(New StringBuilder(), _ - Function(s, c) s.Append(c), _ - Function(s) s.ToString()) - End Function - - Sub Main() - Dim root As XElement = XElement.Load("Report.xml") - - Dim query As IEnumerable(Of XElement) = _ - From el In root.Descendants() _ - Where (el.ShallowValue().StartsWith("=")) _ - Select el - - For Each q As XElement In query - Console.WriteLine("{0}{1}{2}", _ - q.Name.ToString().PadRight(8), _ - q.Attribute("Name").ToString().PadRight(20), _ - q.ShallowValue()) - Next - End Sub -End Module -``` - -This example produces the following output: - -```console -Column Name="CustomerId" =Customer.CustomerId.Heading -Column Name="Name" =Customer.Name.Heading -Column Name="CustomerId" =Customer.CustomerId -Column Name="Name" =Customer.Name -``` - -## See also - -- [LINQ to XML Axes (Visual Basic)](../../../../visual-basic/programming-guide/concepts/linq/linq-to-xml-axes.md) diff --git a/docs/visual-basic/programming-guide/concepts/linq/language-integrated-axes.md b/docs/visual-basic/programming-guide/concepts/linq/language-integrated-axes.md deleted file mode 100644 index cdcec63b07876..0000000000000 --- a/docs/visual-basic/programming-guide/concepts/linq/language-integrated-axes.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: "Language-Integrated Axes in Visual Basic (LINQ to XML)" -ms.date: 07/20/2015 -ms.assetid: d450a556-a134-4261-b011-44e399660894 ---- -# Language-Integrated Axes in Visual Basic (LINQ to XML) -This section describes features built directly into the Visual Basic language to make it easy to access XML. Many of the examples in the LINQ to XML documentation use these integrated Visual Basic axes. - -## In This Section - -|Topic|Description| -|-----------|-----------------| -|[XML Child Axis Property](../../../../visual-basic/language-reference/xml-axis/xml-child-axis-property.md)|Provides access to the children of one of the following: an object, an object, a collection of objects, or a collection of objects. This axis is equivalent to the axis.| -|[XML Descendant Axis Property](../../../../visual-basic/language-reference/xml-axis/xml-descendant-axis-property.md)|Provides access to the descendants of the following: an object, an object, or a collection of objects. This axis is equivalent to the axis.| -|[XML Attribute Axis Property](../../../../visual-basic/language-reference/xml-axis/xml-attribute-axis-property.md)|Provides access to an attribute of an object. This axis is roughly equivalent to the axis. This axis differs from the axis in that it returns the value of the attribute, not an object.| -|[Extension Indexer Property](../../../../visual-basic/language-reference/xml-axis/extension-indexer-property.md)|Provides access to individual elements in a collection.| - -## See also - -- [LINQ to XML Axes (Visual Basic)](../../../../visual-basic/programming-guide/concepts/linq/linq-to-xml-axes.md) diff --git a/docs/visual-basic/programming-guide/concepts/linq/querying-xml-trees.md b/docs/visual-basic/programming-guide/concepts/linq/querying-xml-trees.md deleted file mode 100644 index 3cffa51a58386..0000000000000 --- a/docs/visual-basic/programming-guide/concepts/linq/querying-xml-trees.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: "Querying XML Trees" -ms.date: 07/20/2015 -ms.assetid: 2e35c1ab-08c8-4378-9ca8-8ff344756eda ---- -# Querying XML Trees (Visual Basic) -This section provides examples of [!INCLUDE[sqltecxlinq](~/includes/sqltecxlinq-md.md)] queries. - - For more information about writing LINQ queries, see [Getting Started with LINQ in Visual Basic](../../../../visual-basic/programming-guide/concepts/linq/getting-started-with-linq.md). - - After you have instantiated an XML tree, writing queries is the most effective way to extract data from the tree. Also, querying combined with functional construction enables you to generate a new XML document that has a different shape from the original document. - -## In This Section - -|Topic|Description| -|-----------|-----------------| -|[Basic Queries (LINQ to XML) (Visual Basic)](../../../../visual-basic/programming-guide/concepts/linq/basic-queries-linq-to-xml.md)|Provides common examples of querying XML trees.| -|[Projections and Transformations (LINQ to XML) (Visual Basic)](../../../../visual-basic/programming-guide/concepts/linq/projections-and-transformations-linq-to-xml.md)|Provides common examples of projecting from and transforming XML trees.| -|[Advanced Query Techniques (LINQ to XML) (Visual Basic)](../../../../visual-basic/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md)|Provides query techniques that are useful in more advanced scenarios.| -|[LINQ to XML for XPath Users (Visual Basic)](../../../../visual-basic/programming-guide/concepts/linq/linq-to-xml-for-xpath-users.md)|Presents a number of XPath expressions and their [!INCLUDE[sqltecxlinq](~/includes/sqltecxlinq-md.md)] equivalents.| -|[Pure Functional Transformations of XML (Visual Basic)](../../../../visual-basic/programming-guide/concepts/linq/pure-functional-transformations-of-xml.md)|Presents a small tutorial on writing queries in the style of functional programming.| - -## See also - -- [Programming Guide (LINQ to XML) (Visual Basic)](../../../../visual-basic/programming-guide/concepts/linq/programming-guide-linq-to-xml.md) -- [Getting Started with LINQ in Visual Basic](../../../../visual-basic/programming-guide/concepts/linq/getting-started-with-linq.md)