# File test/xpath_test.rb, line 296 def test_axe_sibling doc = Document.new "<a><b><c/></b><e><f id='10'/><f id='11'/><f id='12'/></e></a>" first_f = XPath.first( doc, "a/e/f" ) assert_not_nil first_f assert_equal '10', first_f.attributes['id'] next_f = XPath.first( doc, "a/e/f/following-sibling::node()" ) assert_equal '11', next_f.attributes['id'] b = XPath.first( doc, "a/e/preceding-sibling::node()" ) assert_equal 'b', b.name end