Take the 2-minute tour ×  How would I query to get a country's
name using the Latitude and Longitude positions using YQL? Or
better could I be pointed to find out the table's columns?
share|improve this question add comment  2 Answers  The above
query does work, but let me take you through all the steps.
Constructing the url query to yahoo and creating a request.
string url =
string.Format("http://query.yahooapis.com/v1/public/yql?q={0}",
HttpUtility.UrlEncode("SELECT * FROM geo.placefinder WHERE
text=\"-27,28\" and gflags=\"r\"")); HttpWebRequest request =
(HttpWebRequest)WebRequest.Create(url); request.Method = "GET";
Getting the response data:  using (WebResponse response =
request.GetResponse())     XmlDocument doc = new XmlDocument();
geo.CountryName = doc.SelectSingleNode("./query/results/Result/c
ountry").InnerText;     geo.AlphaCode = doc.SelectSingleNode("./
query/results/Result/countrycode").InnerText;     geo.City =
doc.SelectSingleNode("./query/results/Result/city").InnerText;
geo.State