Technobabble
To use namespace’d XMLs in Python-XML’s XPath implementation, you need to give XPath a dictionary of namespace mappings, like {”bpws”:”http://docs.oasis-open.org/wsbpel/2.0/process/executable”}. See here:
context = Context(parser.doc, processorNss={"bpws":"http://docs.oasis-open.org/wsbpel/2.0/process/executable"})
nodes = xpath.Evaluate("bpws:process/bpws:variables/*", parser.doc, context=context)
print nodes
My question is: Why do I have to do this? My XML contains a perfectly valid namespace definition:
<bpws:process exitOnStandardFault="yes" suppressJoinFailure="yes" xmlns:bpws="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
Couldn’t find info on that on the net either. ![]()

