Last modified on 10 April 2014, at 13:17

XQuery/Google Docs


You have data stored in a Google Docs spreadsheet. Since Google docs has an RSS feed for their data you can use this service to get well-formed XML about your spreadsheet directly from XQuery.


You can use the base URL of '' to list the data in a public spreadsheet.

let $base-uri := ''
let $document-id := '0AsuPP847sJrUdEdwcVdHeUZ1Sm80dEc1eWZHQkwyZlE'
let $suffix := '/od6/public/basic'

you can concat these three strings together and wrap them in an xs:anyURI type to get the document using the httpcleint:get() function.

Example CodeEdit

xquery version "1.0";
declare namespace atom="";
let $http-get :=
     true(), ())
    Number Entries: { count($http-get//atom:entry) }

Which returns:

   <results>Number Entries: 455</results>


This example was posted on the eXist mailing list in April of 2014 by Dr. Andreas Wagner.