Skip to content

Instantly share code, notes, and snippets.

@mattkruskamp
Created November 9, 2010 17:05
Show Gist options
  • Save mattkruskamp/669395 to your computer and use it in GitHub Desktop.
Save mattkruskamp/669395 to your computer and use it in GitHub Desktop.
This is how to get the XLinq solution
// get the xml from a url that I have created
XElement doc = XElement.Load(url);
// grab the namespace declaration
XNamespace na = doc.GetDefaultNamespace();
// append it to all the queries
var elements = from e in doc.Elements(na + "GeoPlaceDistance")
select e.Element(na + "ToPlace");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment