# Get a Last.fm user's library. # http://www.last.fm/api/show?service=323 import xmlrpc.client import xml.etree server = xmlrpc.client.ServerProxy('http://ws.audioscrobbler.com/2.0/') parameters = {'api_key': 'b25b959554ed76058ac220b7b2e0a026', 'user': 'joanofarctan', 'page': 1} tracks = server.library.getTracks(parameters) tracks_xml = xml.etree.ElementTree.parse(tracks) # Should get "xml.parsers.expat.ExpatError: XML declaration not well-formed: line 1, column 14". # (Line 1, column 14 is a backslash: .)