Methods

XPath::Expression::Attribute

Public Instance Methods

to_xpath(predicate=nil) click to toggle source
# File lib/xpath/expression.rb, line 102
def to_xpath(predicate=nil)
  if @right.is_a?(Literal)
    "#{@left.to_xpath(predicate)}/@#{@right.to_xpath(predicate)}"
  else
    "#{@left.to_xpath(predicate)}/attribute::node()[name(.) = #{@right.to_xpath(predicate)}]"
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.