summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/matcher/xpath.py
blob: b141dd87f2c8be99b6cd965387ec90a6cd24a796 (plain)
1
2
3
4
5
6
7
8
9
10
11
from . import base
from xml.etree import cElementTree

class MatchXPath(base.MatcherBase):

	def match(self, xml):
		x = cElementTree.Element('x')
		x.append(xml)
		if x.find(self._criteria) is not None:
			return True
		return False