Loading [MathJax]/jax/output/HTML-CSS/jax.js
Type:
Class
Constants:
LITERAL : /^'([^']*)'|^"([^"]*)"/u
AXIS : /^(ancestor|ancestor-or-self|attribute|child|descendant|descendant-or-self|following|following-sibling|namespace|parent|preceding|preceding-sibling|self)::/

RelativeLocationPath

1
2
3
4
5
6
7
|                                                    Step
  | (AXIS_NAME '::' | '@' | '')                     AxisSpecifier
    NodeTest
      Predicate
  | '.' | '..'                                      AbbreviatedStep
|  RelativeLocationPath '/' Step
| RelativeLocationPath '//' Step
NCNAMETEST : /^(#{NCNAME_STR}):\*/u
1
2
3
4
Returns a 1-1 map of the nodeset
The contents of the resulting array are either:
  true/false, if a positive match
  String, if a name match

NodeTest

1
2
3
4
| ('*' | NCNAME ':' '*' | QNAME)                NameTest
| NODE_TYPE '(' ')'                              NodeType
| PI '(' LITERAL ')'                            PI
  | '[' expr ']'                                Predicate
QNAME : Namespace::NAMESPLIT
NODE_TYPE : /^(comment|text|node)\s/m
PI : /^processing-instruction\(/
VARIABLE_REFERENCE : /^\$(#{NAME_STR})/u

| VARIABLE_REFERENCE | '(' expr ')' | LITERAL | NUMBER | FunctionCall

NUMBER : /^(\d*\.?\d+)/
NT : /^comment|text|processing-instruction|node$/

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!

predicate
  • References/Ruby on Rails/Ruby/Classes/REXML/REXML::Parsers/REXML::Parsers::XPathParser

predicate(path) Instance Public methods

2025-01-10 15:47:30
predicate_to_string
  • References/Ruby on Rails/Ruby/Classes/REXML/REXML::Parsers/REXML::Parsers::XPathParser

predicate_to_string( path, &block ) Instance Public methods

2025-01-10 15:47:30
parse
  • References/Ruby on Rails/Ruby/Classes/REXML/REXML::Parsers/REXML::Parsers::XPathParser

parse(path) Instance Public methods

2025-01-10 15:47:30
namespaces=
  • References/Ruby on Rails/Ruby/Classes/REXML/REXML::Parsers/REXML::Parsers::XPathParser

namespaces=( namespaces ) Instance Public methods

2025-01-10 15:47:30
expand
  • References/Ruby on Rails/Ruby/Classes/REXML/REXML::Parsers/REXML::Parsers::XPathParser

expand( path ) Instance Public methods

2025-01-10 15:47:30
abbreviate
  • References/Ruby on Rails/Ruby/Classes/REXML/REXML::Parsers/REXML::Parsers::XPathParser

abbreviate( path ) Instance Public methods

2025-01-10 15:47:30