Created
August 24, 2012 09:59
-
-
Save fresky/3448563 to your computer and use it in GitHub Desktop.
Read xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XDocument doc = XDocument.Load("xml.xml"); | |
foreach (var xElement in doc.Descendants("Root")) | |
{ | |
foreach (var s in xElement.Elements()) | |
{ | |
Console.WriteLine(string.Format("{0} : {1}", s.Name, s.Value)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment