Class: Babylon::XpathHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/babylon/xpath_helper.rb

Overview

Custom XPath functions for stanza-routing.

Instance Method Summary collapse

Instance Method Details

#namespace(set, name, nsuri) ⇒ Object

Match nodes of the given name with the given namespace URI.



7
8
9
10
11
# File 'lib/babylon/xpath_helper.rb', line 7

def namespace(set, name, nsuri)
  set.find_all do |n|
    n.name == name && n.namespaces.values.include?(nsuri)
  end
end