Created
January 13, 2015 03:55
-
-
Save automatonic/435df08ad7e2e3a2758e to your computer and use it in GitHub Desktop.
Get XDocument descendants when an xmlns is in play
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
XNamespace ns = "http://somedomain.com/some/path"; | |
//if file.xml root element has xmlns="http://somedomain.com/some/path" | |
var descendants = XDocument.Load("file.xml").Descendants(ns + "Child"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment