Created
June 28, 2011 13:26
-
-
Save jonpryor/1051125 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Enter statements below. | |
csharp> var x = "<response><video>Hi!</video></response>"; | |
csharp> using System.IO; | |
csharp> using System.Xml; | |
csharp> var xs = new StringReader(x); | |
csharp> var d = new XmlDocument(); | |
csharp> d.Load(xs); | |
csharp> d.DocumentElement; | |
{ { { } } } | |
csharp> d.DocumentElement.Name; | |
"response" | |
csharp> d.DocumentElement.SelectNodes("video"); | |
{ { { } } } | |
csharp> foreach (XmlNode n in d.DocumentElement.SelectNodes("video")) Console.WriteLine(n.Name); | |
video |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment