LibXml:
(I will escalate this question to the libxml mothership if necessary.)
I'm porting assert_xpath to libxml. That effort leads to this test case:
def test_deep_node_searches
node = assert_libxml('<foo><bar>content</bar></foo>')
assert{ node.instance_of? XML::Node }
assert{ node.find_first('/foo') }
# assert{ node.find_first('foo') }
# assert{ node.find_first('./foo') }
# assert{ node.find_first('.//foo') }
end
The first assertion with /foo passes, but the rest fail. I would prefer them to
pass! The goal is some assert_xpath calls target a specific foo, but others
just
want any foo south of the current node.
What should I put inside assert_xpath - the find_first, or some other method
that treats its xpathage differently?
http://assertxpath.rubyforge.org/ <-- only REXML or Hpricot so far!
--
Phlip
http://assert2.rubyforge.org/
_______________________________________________
libxml-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/libxml-devel