Beispiel #1
0
 def test_xmlQueryToRegex_text (self) :
     query = "<T> <C> test </C> more text <D> even more text </D> </T>"
     queryroot = et.fromstring(query)
     result = xmlQueryToRegex(queryroot)
     self.assert_(result == ".//T/C/../D/..")
Beispiel #2
0
 def test_xmlQueryToRegex_4 (self) :
     query = "<T> <C> <D> </D> </C> <J> </J> </T>"
     queryroot = et.fromstring(query)
     result = xmlQueryToRegex(queryroot)
     self.assert_(result == ".//T/C/D/../../J/..")
Beispiel #3
0
 def test_xmlQueryToRegex_1 (self) :
     query = "<T></T>"
     queryroot = et.fromstring(query)
     result = xmlQueryToRegex(queryroot)
     self.assert_(result == ".//T")
Beispiel #4
0
 def test_xmlQueryToRegex_text(self):
     query = "<T> <C> test </C> more text <D> even more text </D> </T>"
     queryroot = et.fromstring(query)
     result = xmlQueryToRegex(queryroot)
     self.assert_(result == ".//T/C/../D/..")
Beispiel #5
0
 def test_xmlQueryToRegex_4(self):
     query = "<T> <C> <D> </D> </C> <J> </J> </T>"
     queryroot = et.fromstring(query)
     result = xmlQueryToRegex(queryroot)
     self.assert_(result == ".//T/C/D/../../J/..")
Beispiel #6
0
 def test_xmlQueryToRegex_1(self):
     query = "<T></T>"
     queryroot = et.fromstring(query)
     result = xmlQueryToRegex(queryroot)
     self.assert_(result == ".//T")