I'm having trouble with a particular XPATH in REXML and would greatly
appreciate any help.

Given this simple document..
<body>
<div class="summary">xxx</div>
<div>
<span>yyy</span>
</div>
</body>

The xpath "//div[@class='summary']/following-sibling::div/span" is
failing to return '<span>yyy</span>'.


Here's a console dump that also shows a simplier xpath working.

>> REXML::XPath.match(doc, "//div[@class='summary']/following-sibling::div/span").to_s
=> ""
>> REXML::XPath.match(doc, "//div[@class='summary']/following-sibling::div").to_s
=> "<div>\n<span>yyy</span>\n</div>"
>> puts doc.to_s
<body>
<div class='summary'>xxx</div>
<div>
<span>yyy</span>
</div>
</body>

The xpath works fine in firefox's xpath checker, so it seems like an
issue with rexml.
Any help greatly appreciated.

- Andy
-- 
Posted via http://www.ruby-forum.com/.