Please help with LINQ to XML with BING Maps?

I'm assuming that if a GeocodeResponse has an Address element, it also has a RooftopLocation element XDocument document = XDocument.Load(); IEnumerable responses = document. XPathSelectElement("//GeocodeEntity/GeocodeResponseAddress"); foreach (XElement response in responses) { string postalCode = response. Element("Address").

Attribute("PostalCode"). Value; string latitude = response. Element("RooftopLocation").

Attribute("Latitude"). Value; string longitude = response. Element("RooftopLocation").

Attribute("Longitude"). Value; } Hopefully, this should get you started where you want to go.

I'm assuming that if a GeocodeResponse has an Address element, it also has a RooftopLocation element. XDocument document = XDocument.Load(); IEnumerable responses = document. XPathSelectElement("//GeocodeEntity/GeocodeResponseAddress"); foreach (XElement response in responses) { string postalCode = response.

Element("Address"). Attribute("PostalCode"). Value; string latitude = response.

Element("RooftopLocation"). Attribute("Latitude"). Value; string longitude = response.

Element("RooftopLocation"). Attribute("Longitude"). Value; } Hopefully, this should get you started where you want to go...

Thanks Neil. T: Your code didn't quite work, but gave me enough to go on, many thanks. Here's my 1st solution, I'm sure it can be refactored etc.Prior to using LINQ, I had some very nasty looking Regular expressions doing the work, thankfully they're a thing of the past in this solution.

Float latitude, longitude; string postalCode; XDocument loaded = XDocument. Load(url); IEnumerable responses = loaded.DescendantNodes(); foreach (XElement response in responses) { if (response.Name.LocalName. Equals("Address")) { postalCode = response.

Attribute("PostalCode"). Value; } if (response.Name.LocalName. Equals("RooftopLocation")) { latitude = float.

Parse(response. Attribute("Latitude"). Value); longitude = float.

Parse(response. Attribute("Longitude"). Value); } }.

I'm a LINQ to XML newbie, and a KML newbie as well; so bear with me. My goal is to extract individual Placemarks from a KML file. Xml version="1.0" encoding="utf-8"?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions