home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyo (Python 2.5)
-
- from pyxmpp.xmlextra import common_doc, COMMON_NS
-
- def xpath_eval(node, expr, namespaces = None):
- ctxt = common_doc.xpathNewContext()
- ctxt.setContextNode(node)
- ctxt.xpathRegisterNs('ns', COMMON_NS)
- if namespaces:
- for prefix, uri in namespaces.items():
- ctxt.xpathRegisterNs(unicode(prefix), uri)
-
-
- ret = ctxt.xpathEval(unicode(expr))
- ctxt.xpathFreeContext()
- return ret
-
-