I've got a string like this:
<point srsName="EPSG:4326(WGS84)">
<coordinates>121.7725934555,25.1508396138</coordinates>
How can I only get the values from this string, e.g 121.7725934555,25.1508396138?
If the string is short and you do not need to parse anything else from it, you can use regex:
<coordinates>([^,]+),([^<]+)</coordinates>
The two capturing groups would get 121.7725934555 and 25.1508396138.
var str = @"<point srsName=""EPSG:4326(WGS84)"">
<coordinates>121.7725934555,25.1508396138</coordinates>";
var m = Regex.Match(str, "<coordinates>([^,]+),([^<]+)</coordinates>");
Console.WriteLine("'{0}' '{1}'", m.Groups[1], m.Groups[2]);
Here is a demo on ideone.
XDocumentwould be easier, assuming this is XML. I don't see a closing</point>