Class: Nokolexbor::XPathContext
- Inherits:
-
Object
- Object
- Nokolexbor::XPathContext
- Defined in:
- lib/nokolexbor/xpath_context.rb
Instance Method Summary collapse
-
#register_namespaces(namespaces) ⇒ Object
Register namespaces in
namespaces.
Instance Method Details
#register_namespaces(namespaces) ⇒ Object
Register namespaces in namespaces
7 8 9 10 11 12 |
# File 'lib/nokolexbor/xpath_context.rb', line 7 def register_namespaces(namespaces) namespaces.each do |k, v| k = k.to_s.gsub(/.*:/, "") # strip off 'xmlns:' or 'xml:' register_ns(k, v) end end |