def _enveloped_signature(t, sig_path=".//{%s}Signature" % NS['ds']): sig = t.find(sig_path) if sig is not None: delete_elt(sig) if config.debug_write_to_files: with open("/tmp/foo-env.xml", "w") as fd: fd.write(etree_to_string(t)) return t
def _enveloped_signature(t, sig_path=".//{%s}Signature" % NS['ds']): sig = t.find(sig_path) if sig is not None: delete_elt(sig) if config.debug_write_to_files: with open("/tmp/foo-env.xml", "w") as fd: fd.write(etree.tostring(t)) return t
def _remove_child_comments(t): #root = root_elt(t) for c in t.iter(): if c.tag is etree.Comment or c.tag is etree.PI: delete_elt(c) return t
def _remove_child_comments(t): #root = root_elt(t) for c in t.iter(): if c.tag is etree.Comment or c.tag is etree.PI: delete_elt(c) return t