def __init__(self, doi):
self.url = "<STR_LIT>"<EOL>self.error = False<EOL>try:<EOL><INDENT>data = urllib2.urlopen(self.url + doi).read()<EOL><DEDENT>except urllib2.HTTPError:<EOL><INDENT>self.error = True<EOL><DEDENT>if not self.error:<EOL><INDENT>data = re.sub('<STR_LIT>', '<STR_LIT>', data, count=<NUM_LIT:1>)<EOL>data = re.sub('<STR_LIT>', '<STR_LIT>', data)<EOL>self.data = '<STR_LIT>' +data[<NUM_LIT:0>:len(data) - <NUM_LIT:11>] + '<STR_LIT>'<EOL>self.root = ElementTree.XML(self.data)<EOL>self.xml = XmlDictConfig(self.root)<EOL><DEDENT>
Initialize object.