9 def __init__(filename):
10 self.xmldoc = libxml2.parseFile(filename)
11 # TODO: Check xmldoc against a schema
13 p = self.xmldoc.XPathNewContext()
15 # <context select="..."/>
16 # <rule><argument param="..."/></rule>
17 # <processor name="..."/>
19 context = p.xpathEval('//context/@select')
20 self.context = context[0].value
22 processor = p.xpathEval('//processor@name')
23 self.context = processor[0].value
25 params = p.xpathEval('//rule/argument/@param')
26 self.arguments = [node.value for node in params]