Mega Code Archive

 
Categories / VB.Net / XML LINQ
 

Query Xml document by Node value

Module Program   Sub Main()     Dim doc As XElement = XElement.Load("Inventory.xml")     Dim fords = From c In doc...<Make> Where c.Value = "Ford" Select c     For Each f In fords       Console.WriteLine("Make: {0}", f)     Next   End Sub End Module