def get_epub_opf_xml(filepath):
if not zipfile.is_zipfile(filepath):<EOL><INDENT>raise EPubException('<STR_LIT>')<EOL><DEDENT>zf = zipfile.ZipFile(filepath, '<STR_LIT:r>', compression=zipfile.ZIP_DEFLATED, allowZip64=True)<EOL>container = zf.read('<STR_LIT>')<EOL>container_xmldoc = minidom.parseString(container)<EOL>opf_filepath = container_xmldoc.getElementsByTagName('<STR_LIT>')[<NUM_LIT:0>].attributes['<STR_LIT>'].value<EOL>return zf.read(opf_filepath)<EOL>
Returns the file.OPF contents of the ePub file