Lines Matching defs:XPath
5 # Wrapper class. Use this class to access the XPath functions.
6 class XPath
23 # to values. This can be used to avoid XPath injection attacks
26 # XPath.first( node )
27 # XPath.first( doc, "//b"} )
28 # XPath.first( node, "a/x:b", { "x"=>"http://doofus" } )
29 # XPath.first( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"})
30 def XPath::first element, path=nil, namespaces=nil, variables={}
51 # to values. This can be used to avoid XPath injection attacks
54 # XPath.each( node ) { |el| ... }
55 # XPath.each( node, '/*[@attr='v']' ) { |el| ... }
56 # XPath.each( node, 'ancestor::x' ) { |el| ... }
57 # XPath.each( node, '/book/publisher/text()=$publisher', {}, {"publisher"=>"O'Reilly"}) \
59 def XPath::each element, path=nil, namespaces=nil, variables={}, &block
70 # Returns an array of nodes matching a given XPath.
71 def XPath::match element, path=nil, namespaces=nil, variables={}