File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
python/ql/test/library-tests/frameworks/stdlib Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ match = "dc:title"
2+ ns = {'dc' : 'http://purl.org/dc/elements/1.1/' }
3+
4+ import xml .etree .ElementTree as ET
5+ tree = ET .parse ('country_data.xml' )
6+ root = tree .getroot ()
7+
8+ root .find (match , namespaces = ns ) # $ MISSING: getXPath=match
9+ root .findall (match , namespaces = ns ) # $ MISSING: getXPath=match
10+ root .findtext (match , default = None , namespaces = ns ) # $ MISSING: getXPath=match
11+
12+ from xml .etree .ElementTree import ElementTree
13+ tree = ElementTree ()
14+ tree .parse ("index.xhtml" )
15+
16+ tree .find (match , namespaces = ns ) # $ MISSING: getXPath=match
17+ tree .findall (match , namespaces = ns ) # $ MISSING: getXPath=match
18+ tree .findtext (match , default = None , namespaces = ns ) # $ MISSING: getXPath=match
You can’t perform that action at this time.
0 commit comments