def retrieve_xml(pdb_id, silent = True):
    '''The RCSB website now compresses XML files.'''
    xml_gz = retrieve_file_from_RCSB(get_rcsb_files_connection(), "/download/%s.xml.gz" % pdb_id, silent = silent)
    cf = StringIO.StringIO()
    cf.write(xml_gz)
    cf.seek(0)
    df = gzip.GzipFile(fileobj = cf, mode='rb')
    contents = df.read()
    df.close()
    return contents
def retrieve_xml ( pdb_id , silent = True ) : xml_gz = retrieve_file_from_RCSB ( get_rcsb_files_connection ( ) , "/download/%s.xml.gz" % pdb_id , silent = silent ) cf = StringIO . StringIO ( ) cf . write ( xml_gz ) cf . seek ( 0 ) df = gzip . GzipFile ( fileobj = cf , mode = 'rb' ) contents = df . read ( ) df . close ( ) return contents
The RCSB website now compresses XML files.