Return to Snippet

Revision: 21638
at December 16, 2009 18:57 by pckujawa

Initial Code
<?xml version="1.0" encoding="utf-8" ?>
    <Author>The Reddest</Author>
      Creating an XP Style WPF Button with Silverlight
    <Author>The Fattest</Author>
      Flex And Yahoo Maps
    <Author>The Tallest</Author>
      WPF Tutorial - Creating A Custom Panel Control

XDocument xmlDoc = XDocument.Load("TestFile.xml");

var tutorials = from tutorial in xmlDoc.Descendants("Tutorial")
                select new
                  Author = tutorial.Element("Author").Value,
                  Title = tutorial.Element("Title").Value,
                  Date = tutorial.Element("Date").Value,

Initial URL

Initial Description
See the URL.

Initial Title
Simple XML parsing using LINQ (create an anonymous or real object from XML data)

Initial Tags

Initial Language