April 2008
Intermediate to advanced
704 pages
17h 49m
English
Problem
You need to filter the contents of or find specific elements in an XML document.
Solution
Use any of the query clauses available in System.Xml.Linq.
How It Works
LINQ allows you to execute sophisticated queries on collections that derive from IEnumerable(Of T). The main class used to manipulate XML, XElement, includes several methods (such as Elements, Descendants, and Attributes) that return IEnumerable collections of the appropriate type.
To make things easier and cleaner, LINQ to XML supports the use of shortcuts known as axis properties, which are new to VB .NET 9. The XElement class has three main axis properties available that correlate to either the Elements, Attributes, or Descendants method. ...
Read now
Unlock full access