Open/edit XML file from Google Books?
July 12, 2010 11:24 AM   Subscribe

Better way of viewing an XML file generated by Google Books?

I've amassed a pretty extensive library of titles in Google Books for a research project. I thought it would be an easy way to keep a running list of titles that even aren't available on Google, having publisher info, cover images, sample text, etc. right there. I assumed that when I exported the completed list as an XML file as the FAQ suggests, I could then open it in MS Office or something similar and edit my sources list from there.

However, the file won't open in Excel or Word. I can rename it as a .txt file and open it that way, but it still has many tags and other information. I suppose I could just edit that, but holy cow that'll be time-consuming.

Any suggestions? I know nothing about XML -- I thought it was a spreadsheet format? Some Googling led me to install OpenXMLConverter, but it wouldn't recognize the file. Is there software that will read the file and let me edit the text in a simple fashion? Or am I barking up the wrong tree?

Oh, and I'm on OS 10.5.8.
posted by southvie to Computers & Internet (3 answers total)
 
That XML is meant to be imported into other reference management software tools, like Zotero or Sente (which you should be using anyway to manage your sources, as they can be used for automatic citations and other cool things). However, it looks like neither Zotero or Sente actually support Google Books' XML format, so it's pretty useless.
posted by zsazsa at 12:11 PM on July 12, 2010


XML isn't a spreadsheet format or any other format for that matter, it's more like a raw ingredient that can be used to create any kind of format. OpenXML is one particular example of a format for describing Office documents that uses XML, but that doesn't mean that the Google Books XML file is in any way related or compatible -- it's like saying English and French both use the Latin alphabet.

I played around with it a bit and the schema looks like something ad-hoc that google just made up to facilitate import/export from their app, but one of the selling points for XML is that it is machine readable which means data can be transformed easily. After installing the XML::Simple perl module I was able to come up with the following one-liner to take the Favorites.xml file and export a list in 'Title (author) [ISBN]' format:

perl -MXML::Simple -e 'for (values %{XMLin("Favorites.xml")->{books}->{book}}) { print "$_->{title} ($_->{contributor}) [$_->{identifier}->{value}]\n" }'

I don't know if that's useful for you or not but you could modify it to output the fields you are interested in, or to output CSV for import to a spreadsheet, or whatever.
posted by Rhomboid at 2:02 PM on July 12, 2010


Response by poster: Zsazsa: just checked out Zotero and it seems great. Thanks.

Rhomboid: that's a bit beyond my capabilities, methinks, but your help is much appreciated. Glad at least to know it's not something really obvious that I was missing.

That said, I think more users would embrace Google Books if they had a simple, customizable way of outputting lists/libraries. Listen up, Googz.
posted by southvie at 2:34 PM on July 12, 2010


« Older My company is having a boat party and I don't know...   |   How can I submit a statement to a court regarding... Newer »
This thread is closed to new comments.