Skip to content

Instantly share code, notes, and snippets.

@bertwagner
Last active November 24, 2016 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bertwagner/15441786b3b66d5954c8e06530e48966 to your computer and use it in GitHub Desktop.
Save bertwagner/15441786b3b66d5954c8e06530e48966 to your computer and use it in GitHub Desktop.
Parsing XML data using XmlDocument
public static void XmlDocumentTest(string filePath)
{
List<string> singleRepRowIds = new List<string>();
XmlDocument doc = new XmlDocument();
doc.Load(filePath);
singleRepRowIds = doc.GetElementsByTagName("row").Cast<XmlNode>().Where(x => x.Attributes["Reputation"].InnerText == "1").Select(x => x.Attributes["Id"].InnerText).ToList();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment