A
Andy Watts
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.
<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
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.
<body>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=> said:puts doc.to_s
<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