Skip to content

Instantly share code, notes, and snippets.

@matthewjberger
Last active September 2, 2016 20:08
Show Gist options
  • Save matthewjberger/63fd5e79b09da5c0bd002cdab00de438 to your computer and use it in GitHub Desktop.
Save matthewjberger/63fd5e79b09da5c0bd002cdab00de438 to your computer and use it in GitHub Desktop.
// Create an XML Document from a string
XmlDocument doc = new XmlDocument();
doc.LoadXml(reply);
// Get a node from the XML as an XML object
XmlNode root = doc.SelectSingleNode("//TimeLeft");
// Access specific attributes from the dictionary of attributes on the node
XmlAttribute timeLeft = root?.Attributes["value"];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment