# File test/xpath_test.rb, line 334 def test_namespaces_2 source = "\t\t\t<foo xmlns:ts=\"this\" xmlns:tt=\"that\">\n\t\t\t\t<ts:bar>this bar</ts:bar>\n\t\t\t\t<tt:bar>that bar</tt:bar>\n\t\t\t</foo>\n" doc = Document.new source res = XPath::first(doc, "//*[name()='bar']") assert_equal 'this', res.namespace res = XPath::first(doc.root, "*[namespace_uri()='that']") assert_equal 'that bar', res.text end