def METHOD_NAME(self, filename, tag_name):
    try:
        subprocess.check_call(["/usr/local/bin/xar", "-x",
                               "-C", self.tmpdir, "-f", self.infile, filename])
    except subprocess.CalledProcessError:
        return
    filepath = os.path.join(self.tmpdir, filename)
    if not os.path.exists(filepath):
        return
    with open(filepath, "rb") as f:
        root = ET.parse(f).getroot()
        if root and root.tag == tag_name:
            return root