From the course: .NET Essentials: LINQ for XML
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Challenge: Filter results to show elements with no content - .NET Tutorial
From the course: .NET Essentials: LINQ for XML
Challenge: Filter results to show elements with no content
(upbeat music) - [Instructor] I have another code challenge for you. This time we're looking for Hue values or Saturation values that have no content. So we're going to look inside this file, WebColorsB.xml, and you're going to write a query expression that finds the Hue elements that have no content. And once that's working, then you're going to modify that query expression to find a Hue and Saturation elements that have no content. And the way you do that, is use the & to combine the first and second part of a where clause. Now it's your turn. If you are uncertain how to solve this, refer to the earlier examples, or jump into the next video and follow along with my solution.
Contents
-
-
-
-
-
Use Query syntax to work with elements2m 46s
-
Attribute query1m 27s
-
Select data into a new anonymous type1m 47s
-
Where clause on attribute value1m 53s
-
Where clause with compare2m 11s
-
Aggregate queries2m 1s
-
Choose output order with OrderBy42s
-
Query for empty elements and blank values3m 21s
-
Group by3m 26s
-
Challenge: Create custom string output1m 46s
-
Solution: Create custom string output1m 14s
-
Challenge: Filter results to show elements with no content47s
-
Solution: Filter results to show elements with no content55s
-
Challenge: Filter results to show invalid values1m 39s
-
Solution: Filter results to show invalid values1m 53s
-
-
-