From 37569daa771b532aec36a92cf788d1fa8344f523 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Fri, 31 May 2019 12:37:00 -0400 Subject: [PATCH 1/3] first nodes in querying XML trees --- .openpublishing.redirection.json | 4 +++ .../how-to-calculate-intermediate-values.md | 6 +---- .../how-to-debug-empty-query-results-sets.md | 6 +---- .../how-to-filter-on-an-optional-element.md | 3 +-- ...descendant-using-the-descendants-method.md | 6 +---- .../how-to-find-all-nodes-in-a-namespace.md | 4 --- ...nd-an-element-with-a-specific-attribute.md | 3 +-- ...n-element-with-a-specific-child-element.md | 3 +-- ...escendants-with-a-specific-element-name.md | 3 +-- .../how-to-sort-elements-on-multiple-keys.md | 5 +--- .../concepts/linq/how-to-sort-elements.md | 3 +-- ...ry-that-finds-elements-based-on-context.md | 3 +-- ...to-write-queries-with-complex-filtering.md | 3 +-- ...ng-an-xdocument-vs-querying-an-xelement.md | 5 +--- .../concepts/linq/querying-xml-trees.md | 26 ------------------- .../programming-guide/concepts/linq/toc.yml | 2 -- 16 files changed, 16 insertions(+), 69 deletions(-) delete mode 100644 docs/csharp/programming-guide/concepts/linq/querying-xml-trees.md diff --git a/.openpublishing.redirection.json b/.openpublishing.redirection.json index edbc26e448814..2ed0d71036ecc 100644 --- a/.openpublishing.redirection.json +++ b/.openpublishing.redirection.json @@ -744,6 +744,10 @@ "source_path": "docs/csharp/programming-guide/concepts/linq/working-with-xml-namespaces.md", "redirect_url": "/dotnet/csharp/programming-guide/concepts/linq/namespaces-overview-linq-to-xml" }, + { + "source_path": "docs/csharp/programming-guide/concepts/linq/querying-xml-trees.md", + "redirect_url": "/dotnet/csharp/programming-guide/concepts/linq/how-to-find-an-element-with-a-specific-attribute" + }, { "source_path": "docs/csharp/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-calculate-intermediate-values.md b/docs/csharp/programming-guide/concepts/linq/how-to-calculate-intermediate-values.md index 7626ef0ea6022..5ec6504767809 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-calculate-intermediate-values.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-calculate-intermediate-values.md @@ -34,7 +34,7 @@ foreach (decimal ex in extensions) ``` ## Example - The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/working-with-xml-namespaces.md). + The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/namespaces-overview-linq-to-xml.md). This example uses the following XML document: [Sample XML File: Numerical Data in a Namespace](../../../../csharp/programming-guide/concepts/linq/sample-xml-file-numerical-data-in-a-namespace.md). @@ -60,7 +60,3 @@ foreach (decimal ex in extensions) 198.00 435.00 ``` - -## See also - -- [Basic Queries (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-debug-empty-query-results-sets.md b/docs/csharp/programming-guide/concepts/linq/how-to-debug-empty-query-results-sets.md index 65174bc90e755..6ef2e8401e2cb 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-debug-empty-query-results-sets.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-debug-empty-query-results-sets.md @@ -10,7 +10,7 @@ One of the most common problems when querying XML trees is that if the XML tree The second set of examples show the necessary corrections so that you can query XML in a namespace. - For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/working-with-xml-namespaces.md). + For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/namespaces-overview-linq-to-xml.md). ## Example This example shows creation of XML in a namespace, and a query that returns an empty result set. @@ -75,7 +75,3 @@ Result set follows: 3 End of result set ``` - -## See also - -- [Basic Queries (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-filter-on-an-optional-element.md b/docs/csharp/programming-guide/concepts/linq/how-to-filter-on-an-optional-element.md index 6a9b509d66ffa..fdd48482828d6 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-filter-on-an-optional-element.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-filter-on-an-optional-element.md @@ -48,7 +48,7 @@ Child Four Text ``` ## Example - The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/working-with-xml-namespaces.md). + The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/namespaces-overview-linq-to-xml.md). ```csharp XElement root = XElement.Parse(@" @@ -94,6 +94,5 @@ Child Four Text - - - -- [Basic Queries (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) - [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) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-find-a-single-descendant-using-the-descendants-method.md b/docs/csharp/programming-guide/concepts/linq/how-to-find-a-single-descendant-using-the-descendants-method.md index 069b94871f31f..7eb6dd806ee75 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-find-a-single-descendant-using-the-descendants-method.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-find-a-single-descendant-using-the-descendants-method.md @@ -37,7 +37,7 @@ GC3 Value ``` ## Example - The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/working-with-xml-namespaces.md). + The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/namespaces-overview-linq-to-xml.md). ```csharp XElement root = XElement.Parse(@" @@ -66,7 +66,3 @@ Console.WriteLine(grandChild3); ``` GC3 Value ``` - -## See also - -- [Basic Queries (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-find-all-nodes-in-a-namespace.md b/docs/csharp/programming-guide/concepts/linq/how-to-find-all-nodes-in-a-namespace.md index 6cd5ac000be60..f886f54db01ab 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-find-all-nodes-in-a-namespace.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-find-all-nodes-in-a-namespace.md @@ -88,7 +88,3 @@ Console.WriteLine(newTree); ``` - -## See also - -- [Basic Queries (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) 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 index f7ee67c87efe3..89dbdb3306a38 100644 --- 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 @@ -35,7 +35,7 @@ foreach (XElement el in address) ``` ## Example - The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/working-with-xml-namespaces.md). + The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/namespaces-overview-linq-to-xml.md). This example uses the following XML document: [Sample XML File: Typical Purchase Order in a Namespace](../../../../csharp/programming-guide/concepts/linq/sample-xml-file-typical-purchase-order-in-a-namespace.md). @@ -67,6 +67,5 @@ foreach (XElement el in address) - - -- [Basic Queries (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) - [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) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-find-an-element-with-a-specific-child-element.md b/docs/csharp/programming-guide/concepts/linq/how-to-find-an-element-with-a-specific-child-element.md index b5a5491592587..634be887ae0fd 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-find-an-element-with-a-specific-child-element.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-find-an-element-with-a-specific-child-element.md @@ -29,7 +29,7 @@ foreach (XElement el in tests) ``` ## Example - The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/working-with-xml-namespaces.md). + The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/namespaces-overview-linq-to-xml.md). This example uses the following XML document: [Sample XML File: Test Configuration in a Namespace](../../../../csharp/programming-guide/concepts/linq/sample-xml-file-test-configuration-in-a-namespace1.md). @@ -55,6 +55,5 @@ foreach (XElement el in tests) - - -- [Basic Queries (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) - [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) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-find-descendants-with-a-specific-element-name.md b/docs/csharp/programming-guide/concepts/linq/how-to-find-descendants-with-a-specific-element-name.md index 6c22b5b5c969c..48229d95d7689 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-find-descendants-with-a-specific-element-name.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-find-descendants-with-a-specific-element-name.md @@ -46,7 +46,7 @@ Some text that is broken up into multiple segments. ``` ## Example - The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/working-with-xml-namespaces.md). + The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/namespaces-overview-linq-to-xml.md). ```csharp XElement root = XElement.Parse(@" @@ -88,4 +88,3 @@ Some text that is broken up into multiple segments. ## See also - -- [Basic Queries (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-sort-elements-on-multiple-keys.md b/docs/csharp/programming-guide/concepts/linq/how-to-sort-elements-on-multiple-keys.md index 2fbdb6d8f37b6..1d1c30fdd5c1f 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-sort-elements-on-multiple-keys.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-sort-elements-on-multiple-keys.md @@ -56,7 +56,7 @@ CustomerID:LAZYK EmployeeID:8 ShipPostalCode:99362 OrderDate:5/22/1997 ``` ## Example - The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/working-with-xml-namespaces.md). + The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/namespaces-overview-linq-to-xml.md). This example uses the following XML document: [Sample XML File: Customers and Orders in a Namespace](../../../../csharp/programming-guide/concepts/linq/sample-xml-file-customers-and-orders-in-a-namespace.md). @@ -106,6 +106,3 @@ CustomerID:LAZYK EmployeeID:1 ShipPostalCode:99362 OrderDate:3/21/1997 CustomerID:LAZYK EmployeeID:8 ShipPostalCode:99362 OrderDate:5/22/1997 ``` -## See also - -- [Basic Queries (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-sort-elements.md b/docs/csharp/programming-guide/concepts/linq/how-to-sort-elements.md index 28b327a739198..091930f1055d0 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-sort-elements.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-sort-elements.md @@ -33,7 +33,7 @@ foreach (decimal el in prices) ``` ## Example - The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/working-with-xml-namespaces.md). + The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/namespaces-overview-linq-to-xml.md). This example uses the following XML document: [Sample XML File: Numerical Data in a Namespace](../../../../csharp/programming-guide/concepts/linq/sample-xml-file-numerical-data-in-a-namespace.md). @@ -64,4 +64,3 @@ foreach (decimal el in prices) ## See also - [Sorting Data (C#)](../../../../csharp/programming-guide/concepts/linq/sorting-data.md) -- [Basic Queries (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-write-a-query-that-finds-elements-based-on-context.md b/docs/csharp/programming-guide/concepts/linq/how-to-write-a-query-that-finds-elements-based-on-context.md index 9bf3ff3149dc0..5f765b8b95677 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-write-a-query-that-finds-elements-based-on-context.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-write-a-query-that-finds-elements-based-on-context.md @@ -50,7 +50,7 @@ id = 6 ``` ## Example - The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/working-with-xml-namespaces.md). + The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/namespaces-overview-linq-to-xml.md). ```csharp XElement doc = XElement.Parse(@" @@ -98,4 +98,3 @@ id = 6 - - - -- [Basic Queries (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-write-queries-with-complex-filtering.md b/docs/csharp/programming-guide/concepts/linq/how-to-write-queries-with-complex-filtering.md index ce51d6881cb3d..68d3290f9136e 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-write-queries-with-complex-filtering.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-write-queries-with-complex-filtering.md @@ -36,7 +36,7 @@ foreach (XElement el in purchaseOrders) ``` ## Example - The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/working-with-xml-namespaces.md). + The following example shows the same query for XML that is in a namespace. For more information, see [Working with XML Namespaces (C#)](../../../../csharp/programming-guide/concepts/linq/namespaces-overview-linq-to-xml.md). This example uses the following XML document: [Sample XML File: Multiple Purchase Orders in a Namespace](../../../../csharp/programming-guide/concepts/linq/sample-xml-file-multiple-purchase-orders-in-a-namespace.md). @@ -67,6 +67,5 @@ foreach (XElement el in purchaseOrders) - - -- [Basic Queries (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) - [Projection Operations (C#)](../../../../csharp/programming-guide/concepts/linq/projection-operations.md) - [Quantifier Operations (C#)](../../../../csharp/programming-guide/concepts/linq/quantifier-operations.md) diff --git a/docs/csharp/programming-guide/concepts/linq/querying-an-xdocument-vs-querying-an-xelement.md b/docs/csharp/programming-guide/concepts/linq/querying-an-xdocument-vs-querying-an-xelement.md index 650ce14abd647..bb863921a1fc9 100644 --- a/docs/csharp/programming-guide/concepts/linq/querying-an-xdocument-vs-querying-an-xelement.md +++ b/docs/csharp/programming-guide/concepts/linq/querying-an-xdocument-vs-querying-an-xelement.md @@ -102,7 +102,4 @@ Querying tree loaded with XDocument.Load 2 3 ``` - -## See also - -- [Basic Queries (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/basic-queries-linq-to-xml.md) + \ No newline at end of file diff --git a/docs/csharp/programming-guide/concepts/linq/querying-xml-trees.md b/docs/csharp/programming-guide/concepts/linq/querying-xml-trees.md deleted file mode 100644 index f733ac87e6a85..0000000000000 --- a/docs/csharp/programming-guide/concepts/linq/querying-xml-trees.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -title: "Querying XML Trees (C#)" -ms.date: 07/20/2015 -ms.assetid: 0913d81b-541a-4fd4-9cbf-7ec89fd817ea ---- -# Querying XML Trees (C#) -This section provides examples of [!INCLUDE[sqltecxlinq](~/includes/sqltecxlinq-md.md)] queries. - - For more information about writing [!INCLUDE[vbteclinq](~/includes/vbteclinq-md.md)] queries, see [Getting Started with LINQ in C#](../../../../csharp/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) (C#)](../../../../csharp/programming-guide/concepts/linq/basic-queries-linq-to-xml.md)|Provides common examples of querying XML trees.| -|[Projections and Transformations (LINQ to XML) (C#)](../../../../csharp/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) (C#)](../../../../csharp/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 (C#)](../../../../csharp/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 (C#)](../../../../csharp/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) (C#)](../../../../csharp/programming-guide/concepts/linq/programming-guide-linq-to-xml.md) -- [Getting Started with LINQ in C#](../../../../csharp/programming-guide/concepts/linq/getting-started-with-linq.md) diff --git a/docs/csharp/programming-guide/concepts/linq/toc.yml b/docs/csharp/programming-guide/concepts/linq/toc.yml index 782ea61c83a55..2f06f3301a34e 100644 --- a/docs/csharp/programming-guide/concepts/linq/toc.yml +++ b/docs/csharp/programming-guide/concepts/linq/toc.yml @@ -211,10 +211,8 @@ - name: "How to: Retrieve the Shallow Value of an Element" href: how-to-retrieve-the-shallow-value-of-an-element.md - name: Querying XML Trees - href: querying-xml-trees.md items: - name: Basic Queries (LINQ to XML) - href: basic-queries-linq-to-xml.md items: - name: "How to: Find an Element with a Specific Attribute" href: how-to-find-an-element-with-a-specific-attribute.md From 5047340ade09b6975ebd69dd631bdfba197d5c54 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Fri, 31 May 2019 12:41:35 -0400 Subject: [PATCH 2/3] add projections and transformations --- .openpublishing.redirection.json | 4 ++++ ...how-to-control-the-type-of-a-projection.md | 1 - .../how-to-generate-xml-from-csv-files.md | 5 +--- .../how-to-project-a-new-type-linq-to-xml.md | 5 +--- .../linq/how-to-project-an-anonymous-type.md | 5 +--- .../linq/how-to-project-an-object-graph.md | 1 - ...w-to-transform-the-shape-of-an-xml-tree.md | 4 ---- ...ork-with-dictionaries-using-linq-to-xml.md | 5 +--- ...ections-and-transformations-linq-to-xml.md | 24 ------------------- .../programming-guide/concepts/linq/toc.yml | 1 - 10 files changed, 8 insertions(+), 47 deletions(-) delete mode 100644 docs/csharp/programming-guide/concepts/linq/projections-and-transformations-linq-to-xml.md diff --git a/.openpublishing.redirection.json b/.openpublishing.redirection.json index 2ed0d71036ecc..5e59a44273f03 100644 --- a/.openpublishing.redirection.json +++ b/.openpublishing.redirection.json @@ -744,6 +744,10 @@ "source_path": "docs/csharp/programming-guide/concepts/linq/working-with-xml-namespaces.md", "redirect_url": "/dotnet/csharp/programming-guide/concepts/linq/namespaces-overview-linq-to-xml" }, + { + "source_path": "docs/csharp/programming-guide/concepts/linq/projections-and-transformations-linq-to-xml.md", + "redirect_url": "/dotnet/csharp/programming-guide/concepts/linq/how-to-work-with-dictionaries-using-linq-to-xml" + }, { "source_path": "docs/csharp/programming-guide/concepts/linq/querying-xml-trees.md", "redirect_url": "/dotnet/csharp/programming-guide/concepts/linq/how-to-find-an-element-with-a-specific-attribute" diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-control-the-type-of-a-projection.md b/docs/csharp/programming-guide/concepts/linq/how-to-control-the-type-of-a-projection.md index 6366eb732369f..efa82ba97a558 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-control-the-type-of-a-projection.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-control-the-type-of-a-projection.md @@ -66,4 +66,3 @@ LETSS:Let's Stop N Shop:Jaime Yorres ## See also - -- [Projections and Transformations (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/projections-and-transformations-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-generate-xml-from-csv-files.md b/docs/csharp/programming-guide/concepts/linq/how-to-generate-xml-from-csv-files.md index a10b837e511e0..82cc711a20e1f 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-generate-xml-from-csv-files.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-generate-xml-from-csv-files.md @@ -100,7 +100,4 @@ Console.WriteLine(cust); ``` - -## See also - -- [Projections and Transformations (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/projections-and-transformations-linq-to-xml.md) + \ No newline at end of file diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-project-a-new-type-linq-to-xml.md b/docs/csharp/programming-guide/concepts/linq/how-to-project-a-new-type-linq-to-xml.md index ed54f5436d2ed..4b85646de5968 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-project-a-new-type-linq-to-xml.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-project-a-new-type-linq-to-xml.md @@ -47,7 +47,4 @@ class Program { Lawnmower:1 Baby Monitor:2 ``` - -## See also - -- [Projections and Transformations (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/projections-and-transformations-linq-to-xml.md) + \ No newline at end of file diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-project-an-anonymous-type.md b/docs/csharp/programming-guide/concepts/linq/how-to-project-an-anonymous-type.md index 8a092028ff99e..6fd1596ee8fc2 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-project-an-anonymous-type.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-project-an-anonymous-type.md @@ -45,7 +45,4 @@ HUNGC:Hungry Coyote Import Store:Yoshi Latimer LAZYK:Lazy K Kountry Store:John Steel LETSS:Let's Stop N Shop:Jaime Yorres ``` - -## See also - -- [Projections and Transformations (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/projections-and-transformations-linq-to-xml.md) + \ No newline at end of file diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-project-an-object-graph.md b/docs/csharp/programming-guide/concepts/linq/how-to-project-an-object-graph.md index 8dbee836c81c1..01ec24043bcfa 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-project-an-object-graph.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-project-an-object-graph.md @@ -253,4 +253,3 @@ ShipDate: 5/21/1999 - - -- [Projections and Transformations (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/projections-and-transformations-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-transform-the-shape-of-an-xml-tree.md b/docs/csharp/programming-guide/concepts/linq/how-to-transform-the-shape-of-an-xml-tree.md index 7d15b7b72f7eb..0a719df509c43 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-transform-the-shape-of-an-xml-tree.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-transform-the-shape-of-an-xml-tree.md @@ -131,7 +131,3 @@ static void Main(string[] args) USA ``` - -## See also - -- [Projections and Transformations (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/projections-and-transformations-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-work-with-dictionaries-using-linq-to-xml.md b/docs/csharp/programming-guide/concepts/linq/how-to-work-with-dictionaries-using-linq-to-xml.md index 38accaacb7f2f..36d9b6a68036b 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-work-with-dictionaries-using-linq-to-xml.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-work-with-dictionaries-using-linq-to-xml.md @@ -59,7 +59,4 @@ Child2:Value2 Child3:Value3 Child4:Value4 ``` - -## See also - -- [Projections and Transformations (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/projections-and-transformations-linq-to-xml.md) + \ No newline at end of file diff --git a/docs/csharp/programming-guide/concepts/linq/projections-and-transformations-linq-to-xml.md b/docs/csharp/programming-guide/concepts/linq/projections-and-transformations-linq-to-xml.md deleted file mode 100644 index 8affb5e6cceb1..0000000000000 --- a/docs/csharp/programming-guide/concepts/linq/projections-and-transformations-linq-to-xml.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: "Projections and Transformations (LINQ to XML) (C#)" -ms.date: 07/20/2015 -ms.assetid: bb0457ab-1823-47e6-9d2d-c93c958cc913 ---- -# Projections and Transformations (LINQ to XML) (C#) -This section provides examples of [!INCLUDE[sqltecxlinq](~/includes/sqltecxlinq-md.md)] projections and transformations. - -## In This Section - -|Topic|Description| -|-----------|-----------------| -|[How to: Work with Dictionaries Using LINQ to XML (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-work-with-dictionaries-using-linq-to-xml.md)|Shows how to transform dictionaries to XML, and how to transform XML into dictionaries.| -|[How to: Transform the Shape of an XML Tree (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-transform-the-shape-of-an-xml-tree.md)|Shows how to transform the shape of an XML document.| -|[How to: Control the Type of a Projection (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-control-the-type-of-a-projection.md)|Shows how to control the type of a [!INCLUDE[sqltecxlinq](~/includes/sqltecxlinq-md.md)] query.| -|[How to: Project a New Type (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-project-a-new-type-linq-to-xml.md)|Shows how to project a collection of a user-defined type from a [!INCLUDE[sqltecxlinq](~/includes/sqltecxlinq-md.md)] query.| -|[How to: Project an Object Graph (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-project-an-object-graph.md)|Shows how to project a more complex object graph from a [!INCLUDE[sqltecxlinq](~/includes/sqltecxlinq-md.md)] query.| -|[How to: Project an Anonymous Type (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-project-an-anonymous-type.md)|Shows how to project a collection of anonymous objects from a [!INCLUDE[sqltecxlinq](~/includes/sqltecxlinq-md.md)] query.| -|[How to: Generate Text Files from XML (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-generate-text-files-from-xml.md)|Shows how to transform an XML file to a non-XML text file.| -|[How to: Generate XML from CSV Files (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-generate-xml-from-csv-files.md)|Shows how to use [!INCLUDE[vbteclinq](~/includes/vbteclinq-md.md)] to parse a CSV file and generate XML from it.| - -## See also - -- [Querying XML Trees (C#)](../../../../csharp/programming-guide/concepts/linq/querying-xml-trees.md) diff --git a/docs/csharp/programming-guide/concepts/linq/toc.yml b/docs/csharp/programming-guide/concepts/linq/toc.yml index 2f06f3301a34e..e21de5b940fde 100644 --- a/docs/csharp/programming-guide/concepts/linq/toc.yml +++ b/docs/csharp/programming-guide/concepts/linq/toc.yml @@ -241,7 +241,6 @@ - name: "How to: Debug Empty Query Results Sets" href: how-to-debug-empty-query-results-sets.md - name: Projections and Transformations (LINQ to XML) - href: projections-and-transformations-linq-to-xml.md items: - name: "How to: Work with Dictionaries Using LINQ to XML" href: how-to-work-with-dictionaries-using-linq-to-xml.md From 9ca15247736bc78b8f063cd8630991471dba51f3 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Fri, 31 May 2019 12:49:34 -0400 Subject: [PATCH 3/3] add advanced query techniques --- .openpublishing.redirection.json | 4 +++ .../advanced-query-techniques-linq-to-xml.md | 25 ------------------- .../how-to-create-hierarchy-using-grouping.md | 4 --- ...how-to-join-two-collections-linq-to-xml.md | 4 --- .../linq/how-to-list-all-nodes-in-a-tree.md | 5 +--- ...w-to-modify-an-office-open-xml-document.md | 5 +--- ...treaming-transformations-of-text-to-xml.md | 1 - ...pulate-an-xml-tree-from-the-file-system.md | 4 --- .../how-to-query-linq-to-xml-using-xpath.md | 5 +--- ...graphs-from-an-office-open-xml-document.md | 6 +---- .../how-to-write-a-linq-to-xml-axis-method.md | 5 +--- .../programming-guide/concepts/linq/toc.yml | 1 - 12 files changed, 9 insertions(+), 60 deletions(-) delete mode 100644 docs/csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md diff --git a/.openpublishing.redirection.json b/.openpublishing.redirection.json index 5e59a44273f03..046c100a1f34c 100644 --- a/.openpublishing.redirection.json +++ b/.openpublishing.redirection.json @@ -692,6 +692,10 @@ "source_path": "docs/csharp/programming-guide/concepts/async/asynchronous-programming-with-async-and-await.md", "redirect_url": "/dotnet/csharp/async/" }, + { + "source_path": "docs/csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md", + "redirect_url": "/dotnet/csharp/programming-guide/concepts/linq/how-to-join-two-collections-linq-to-xml" + }, { "source_path": "docs/csharp/programming-guide/concepts/linq/cloning-vs-attaching.md", "redirect_url": "/dotnet/csharp/programming-guide/concepts/linq/creating-xml-trees-linq-to-xml-2#attaching-vs-cloning" diff --git a/docs/csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md b/docs/csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md deleted file mode 100644 index f186dba9649a9..0000000000000 --- a/docs/csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: "Advanced Query Techniques (LINQ to XML) (C#)" -ms.date: 07/20/2015 -ms.assetid: 028d978e-215b-4d50-ba70-adce0659386d ---- -# Advanced Query Techniques (LINQ to XML) (C#) -This section provides examples of more advanced [!INCLUDE[sqltecxlinq](~/includes/sqltecxlinq-md.md)] query techniques. - -## In This Section - -|Topic|Description| -|-----------|-----------------| -|[How to: Join Two Collections (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-join-two-collections-linq-to-xml.md)|Shows how to use the `Join` clause to take advantage of relationships in XML data.| -|[How to: Create Hierarchy Using Grouping (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-create-hierarchy-using-grouping.md)|Shows how to group data, and then generate XML based on the grouping.| -|[How to: Query LINQ to XML Using XPath (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-query-linq-to-xml-using-xpath.md)|Shows how to retrieve collections based on XPath queries.| -|[How to: Write a LINQ to XML Axis Method (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-write-a-linq-to-xml-axis-method.md)|Shows how to write a [!INCLUDE[sqltecxlinq](~/includes/sqltecxlinq-md.md)] axis method.| -|[How to: Perform Streaming Transformations of Text to XML (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-perform-streaming-transformations-of-text-to-xml.md)|Shows how to transform very large text files into XML while maintaining a small memory footprint.| -|[How to: List All Nodes in a Tree (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-list-all-nodes-in-a-tree.md)|Presents a utility method that lists all nodes in an XML tree. This is useful for debugging code that modifies an XML tree.| -|[How to: Retrieve Paragraphs from an Office Open XML Document (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-retrieve-paragraphs-from-an-office-open-xml-document.md)|Presents code that opens an Office Open XML Document, retrieves the paragraphs in a collection of XElement objects, the text of the paragraphs, and the style of the paragraphs.| -|[How to: Modify an Office Open XML Document (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-modify-an-office-open-xml-document.md)|Presents code that opens, modifies, and saves an Office Open XML Document.| -|[How to: Populate an XML Tree from the File System (C#)](../../../../csharp/programming-guide/concepts/linq/how-to-populate-an-xml-tree-from-the-file-system.md)|Presents code that creates an XML tree from the file system.| - -## See also - -- [Querying XML Trees (C#)](../../../../csharp/programming-guide/concepts/linq/querying-xml-trees.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-create-hierarchy-using-grouping.md b/docs/csharp/programming-guide/concepts/linq/how-to-create-hierarchy-using-grouping.md index 975bd187bd07e..84c46a0dbcd9e 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-create-hierarchy-using-grouping.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-create-hierarchy-using-grouping.md @@ -67,7 +67,3 @@ Console.WriteLine(newData); ``` - -## See also - -- [Advanced Query Techniques (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-join-two-collections-linq-to-xml.md b/docs/csharp/programming-guide/concepts/linq/how-to-join-two-collections-linq-to-xml.md index 6ca1ecff00457..64222b54b6266 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-join-two-collections-linq-to-xml.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-join-two-collections-linq-to-xml.md @@ -117,7 +117,3 @@ Attempting to validate, custOrdDoc validated ``` - -## See also - -- [Advanced Query Techniques (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-list-all-nodes-in-a-tree.md b/docs/csharp/programming-guide/concepts/linq/how-to-list-all-nodes-in-a-tree.md index 3d48110882589..87992d337aa45 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-list-all-nodes-in-a-tree.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-list-all-nodes-in-a-tree.md @@ -341,7 +341,4 @@ class Program /Root/aw:ElementInNamespace /Root/aw:ElementInNamespace/aw:ChildInNamespace ``` - -## See also - -- [Advanced Query Techniques (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md) + \ No newline at end of file diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-modify-an-office-open-xml-document.md b/docs/csharp/programming-guide/concepts/linq/how-to-modify-an-office-open-xml-document.md index a53f023445bad..555f87835cf41 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-modify-an-office-open-xml-document.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-modify-an-office-open-xml-document.md @@ -140,7 +140,4 @@ class Program ``` New first paragraph: >PARSING WORDPROCESSINGML WITH LINQ TO XML< ``` - -## See also - -- [Advanced Query Techniques (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md) + \ No newline at end of file diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-perform-streaming-transformations-of-text-to-xml.md b/docs/csharp/programming-guide/concepts/linq/how-to-perform-streaming-transformations-of-text-to-xml.md index dd35950dd9b71..e37ea2b2fc8f2 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-perform-streaming-transformations-of-text-to-xml.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-perform-streaming-transformations-of-text-to-xml.md @@ -83,4 +83,3 @@ class Program ## See also - -- [Advanced Query Techniques (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-populate-an-xml-tree-from-the-file-system.md b/docs/csharp/programming-guide/concepts/linq/how-to-populate-an-xml-tree-from-the-file-system.md index 1e5f251b44df3..882067203c7d5 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-populate-an-xml-tree-from-the-file-system.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-populate-an-xml-tree-from-the-file-system.md @@ -109,7 +109,3 @@ class Program ------ Total File Size:59089 ``` - -## See also - -- [Advanced Query Techniques (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-query-linq-to-xml-using-xpath.md b/docs/csharp/programming-guide/concepts/linq/how-to-query-linq-to-xml-using-xpath.md index ab21864869161..cf365f323f9e4 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-query-linq-to-xml-using-xpath.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-query-linq-to-xml-using-xpath.md @@ -32,7 +32,4 @@ foreach (XElement el in list) 5 6 ``` - -## See also - -- [Advanced Query Techniques (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md) + \ No newline at end of file diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-retrieve-paragraphs-from-an-office-open-xml-document.md b/docs/csharp/programming-guide/concepts/linq/how-to-retrieve-paragraphs-from-an-office-open-xml-document.md index ba45e0064197a..d57fe373a8f32 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-retrieve-paragraphs-from-an-office-open-xml-document.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-retrieve-paragraphs-from-an-office-open-xml-document.md @@ -13,7 +13,7 @@ This topic presents an example that opens an Office Open XML document, and retri The example uses an extension method named `StringConcatenate`, which is also supplied in the example. - For a detailed tutorial that explains how this example works, see [Pure Functional Transformations of XML (C#)](../../../../csharp/programming-guide/concepts/linq/pure-functional-transformations-of-xml.md). + For a detailed tutorial that explains how this example works, see [Pure Functional Transformations of XML (C#)](../../../../csharp/programming-guide/concepts/linq/introduction-to-pure-functional-transformations.md). This example uses classes found in the WindowsBase assembly. It uses types in the namespace. @@ -176,7 +176,3 @@ StyleName:Normal >This example produces the following output:< StyleName:Normal >< StyleName:Code >Hello World< ``` - -## See also - -- [Advanced Query Techniques (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md) diff --git a/docs/csharp/programming-guide/concepts/linq/how-to-write-a-linq-to-xml-axis-method.md b/docs/csharp/programming-guide/concepts/linq/how-to-write-a-linq-to-xml-axis-method.md index 1d98e204001a8..c94cebf87e4f7 100644 --- a/docs/csharp/programming-guide/concepts/linq/how-to-write-a-linq-to-xml-axis-method.md +++ b/docs/csharp/programming-guide/concepts/linq/how-to-write-a-linq-to-xml-axis-method.md @@ -284,7 +284,4 @@ class Program /PurchaseOrders/PurchaseOrder[3]/@OrderDate 1999-10-22 ``` - -## See also - -- [Advanced Query Techniques (LINQ to XML) (C#)](../../../../csharp/programming-guide/concepts/linq/advanced-query-techniques-linq-to-xml.md) + \ No newline at end of file diff --git a/docs/csharp/programming-guide/concepts/linq/toc.yml b/docs/csharp/programming-guide/concepts/linq/toc.yml index e21de5b940fde..c4ae4e2106617 100644 --- a/docs/csharp/programming-guide/concepts/linq/toc.yml +++ b/docs/csharp/programming-guide/concepts/linq/toc.yml @@ -259,7 +259,6 @@ - name: "How to: Generate XML from CSV Files" href: how-to-generate-xml-from-csv-files.md - name: Advanced Query Techniques (LINQ to XML) - href: advanced-query-techniques-linq-to-xml.md items: - name: "How to: Join Two Collections (LINQ to XML)" href: how-to-join-two-collections-linq-to-xml.md