In: |
rexml/xpath_parser.rb
|
Parent: | Object |
You don’t want to use this class. Really. Use XPath, which is a wrapper for this class. Believe me. You don’t want to poke around in here. There is strange, dark magic at work in this code. Beware. Go back! Go back while you still can!
LITERAL | = | /^'([^']*)'|^"([^"]*)"/u |
# File rexml/xpath_parser.rb, line 14 def initialize( ) @parser = REXML::Parsers::XPathParser.new @namespaces = {} @variables = {} end
# File rexml/xpath_parser.rb, line 42 def []=( variable_name, value ) @variables[ variable_name ] = value end
# File rexml/xpath_parser.rb, line 20 def namespaces=( namespaces={} ) Functions::namespace_context = namespaces @namespaces = namespaces end
# File rexml/xpath_parser.rb, line 30 def parse path, nodeset path_stack = @parser.parse( path ) #puts "PARSE: #{path} => #{path_stack.inspect}" #puts "PARSE: nodeset = #{nodeset.collect{|x|x.to_s}.inspect}" match( path_stack, nodeset ) end
# File rexml/xpath_parser.rb, line 37 def predicate path, nodeset path_stack = @parser.predicate( path ) return Predicate( path_stack, nodeset ) end