<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Query GeoNames from Google Docs"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "Query GeoNames from Google Docs"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Query GeoNames from Google Docs</title>
				<description><![CDATA[ Here's a really nice feature of the spreadsheet in Google Docs.   The "IMPORTXML" feature can grab XML from a URL.  Which means you can perform queries against the GeoNames foums from within a google docs spreadsheet.

For example, paste this into a spreadsheet cell:
=IMPORTXML("http://ws.geonames.org/search?q=Sydney&maxRows=1&style=FULL", "/geonames/geoname[1]/timezone")

This will grab the xml at "http://ws.geonames.org/search?q=Sydney&maxRows=1&style=FULL", and use the XPATH query in the second parameter to grab the timezone.

The becomes a lot more useful when combined with a CONCATENATE function.  Try this, paste three cities into cells A1-A3: "Sydney, Paris, Damascus".  In B1 paste in a function to get the timezone for the city in cell A1:
=IMPORTXML(CONCATENATE("http://ws.geonames.org/search?q=",A1,"&maxRows=1&style=FULL"), "/geonames/geoname[1]/timezone")

..and you get the timezone.  Now drag the formula down to the next two cells to get all the timezones.  Nice!

Hopefully the Geonames webservice can handle everyone playing around with this feature. :)  Note: google docs limits you to 50 IMPORTXML queries per spreadsheet : http://documents.google.com/support/bin/answer.py?hl=en&answer=75507 .]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1237.page#5302</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1237.page#5302</link>
				<pubDate><![CDATA[Mon, 26 Jan 2009 13:06:59]]> GMT</pubDate>
				<author><![CDATA[ russau]]></author>
			</item>
			<item>
				<title>Re:Query GeoNames from Google Docs</title>
				<description><![CDATA[ Thanks for sharing this tip with us.

Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1237.page#5304</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1237.page#5304</link>
				<pubDate><![CDATA[Mon, 26 Jan 2009 21:51:47]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>Re:Query GeoNames from Google Docs</title>
				<description><![CDATA[ Hi Russau,

Sure this works?? It gives me a parse error!!!

Thanks,
Ron]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1237.page#6795</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1237.page#6795</link>
				<pubDate><![CDATA[Wed, 2 Dec 2009 14:16:38]]> GMT</pubDate>
				<author><![CDATA[ sahertian]]></author>
			</item>
			<item>
				<title>Re:Query GeoNames from Google Docs</title>
				<description><![CDATA[ I just tried it again, and it works fine.  Did you definitely copy/paste the full IMPORTXML function?]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1237.page#6801</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1237.page#6801</link>
				<pubDate><![CDATA[Thu, 3 Dec 2009 11:52:40]]> GMT</pubDate>
				<author><![CDATA[ russau]]></author>
			</item>
			<item>
				<title>Re:Query GeoNames from Google Docs</title>
				<description><![CDATA[ Yes, did a paste in a spreadsheetcel...

=IMPORTXML("http://ws.geonames.org/search?q=Sydney&maxRows=1&style=FULL", "/geonames/geoname[1]/timezone")


thanks,
Ron]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1237.page#6802</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1237.page#6802</link>
				<pubDate><![CDATA[Thu, 3 Dec 2009 12:02:55]]> GMT</pubDate>
				<author><![CDATA[ sahertian]]></author>
			</item>
			<item>
				<title>Re:Query GeoNames from Google Docs</title>
				<description><![CDATA[ This is the link..

https://spreadsheets.google.com/ccc?key=0Aq4-NxQ0NzNDdENHa3hyY1pEZjlvM0dsRDRnRHRpUVE&hl=nl]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1237.page#6803</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1237.page#6803</link>
				<pubDate><![CDATA[Thu, 3 Dec 2009 12:06:13]]> GMT</pubDate>
				<author><![CDATA[ sahertian]]></author>
			</item>
			<item>
				<title>Re:Query GeoNames from Google Docs</title>
				<description><![CDATA[ Works now...

It has to do with the default language for the spreadsheet. Changed it from Dutch to US.

Thanks..]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1237.page#6805</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1237.page#6805</link>
				<pubDate><![CDATA[Thu, 3 Dec 2009 14:40:25]]> GMT</pubDate>
				<author><![CDATA[ sahertian]]></author>
			</item>
	</channel>
</rss>