Are there any XML parsers for Ruby that fully support XPath 2.0?

I need to see if a node exists inside a specific XML document. If node doesn't exist, then I would like to use a different value. As of XPath 1.0, this assumes madness using concat

. With XPath 2.0, I can get it to work with:

if (boolean(path-to-preferred-node)) then path-to-preferred-node else default-to-other-node

      

We need to use XPath 2.0 for this, which excludes Nokogiri.

Any help would be greatly appreciated.

+3


source to share





All Articles