class XMLScan::XPath::DOM::AbstractNodeAdapter

Attributes

node[R]

Public Instance Methods

children() click to toggle source
# File lib/xml/dom2/xpath.rb, line 38
def children
  @node.childNodes.to_a
end
each_following_siblings() { |node while node = nextSibling| ... } click to toggle source
# File lib/xml/dom2/xpath.rb, line 42
def each_following_siblings
  node = @node
  yield node while node = node.nextSibling
end
each_preceding_siblings() { |node while node = previousSibling| ... } click to toggle source
# File lib/xml/dom2/xpath.rb, line 47
def each_preceding_siblings
  node = @node
  yield node while node = node.previousSibling
end
index() click to toggle source
# File lib/xml/dom2/xpath.rb, line 52
def index
  @node.parentNode.childNodes.to_a.index(@node)
end
lang() click to toggle source
# File lib/xml/dom2/xpath.rb, line 56
def lang
  node = @node
  lang = nil
  until a = node.attributes and lang = a.getNamedItem('xml:lang')
    node = node.parentNode
  end
  lang and lang.nodeValue
end
parent() click to toggle source
# File lib/xml/dom2/xpath.rb, line 34
def parent
  @node.parentNode
end
root() click to toggle source
# File lib/xml/dom2/xpath.rb, line 30
def root
  @node.ownerDocument
end
wrap(node, visitor) click to toggle source
# File lib/xml/dom2/xpath.rb, line 23
def wrap(node, visitor)
  @node = node
  self
end