Parse particular text from an XML string?

Try this var url = "xxxxxxxxxxxxxx.co.uk/map.aspx?isTrafficA...; var items = url. Split('? ')1 .

Split('&') . Select(i => i. Split('=')) .

ToDictionary(o => o0, o => o1); var lon = items"lon"; var lat = items"lat".

Thanks guys, I will try them out tonight! – Dan Sewell Dec 3 '10 at 15:28.

If you only need the Lat and Lon values and the feed is just one big XML string you can do the whole thing with a regular expression. Var rssFeed = @"xxxxxxxxxxxxxx.co.uk/map.aspx?isTrafficA... xxxxxxxxxxxxxx.co.uk/map.aspx?isTrafficA... xxxxxxxxxxxxxx.co.uk/map.aspx?isTrafficA... xxxxxxxxxxxxxx.co.uk/map.aspx?isTrafficA...; var regex = new Regex(@"lat=(?+-? \d*\.

\d*)&lon=(?+-? \d*\. \d*)"); var latLongPairs = new List>(); foreach (Match match in regex.

Matches(rssFeed)) { var lat = Convert. ToDecimal(match. Groups"Lat".

Value); var lon = Convert. ToDecimal(match. Groups"Lon".

Value); latLongPairs. Add(new Tuple(lat, lon)); }.

– Dan Sewell Dec 6 '10 at 20:55 actually it seems WP7 doesn't have tuple! – Dan Sewell Dec 6 '10 at 20:58.

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