According to the My Library FAQ, I can export my bookshelf as XML by following these instructions:
When viewing any bookshelves within 'My library' on Google Books, simply select Export as XML to download that bookshelf file.
However, when I want to import a list of books I must use a list of ISBN numbers by following these instructions:
When viewing any bookshelves within 'My library' on Google Books, click Options, then select Add by ISBN or ISSN. Enter one ISBN or ISSN per line, and click the Add books button when you are done.
How can I use the XML file I exported from My Library in order to import my books (maybe because I'm switching accounts and want to transfer my library)?
If you have Python installed, you can run this script, which will print out every ISBN number found in each XML file in the current directory.
import glob
for xml in glob.glob('*.xml'):
with open(xml) as f:
for line in f:
line = line.strip()
if line.startswith('<value>'):
# ISBN number is between the <value>...</value> tags.
print line[7:-8]