I have the following XML document:
@NOT_USED@
I see a two different options for you:
Remove all the namespaces
http://www.rubydoc.info/github/sparklemotion/nokogiri/Nokogiri/XML/Document#remove_namespaces%21-instance_method
Brute force way of doing it. Could lead to problems where there are namespace collisions.
Use collect_namespaces
http://www.rubydoc.info/github/sparklemotion/nokogiri/Nokogiri/XML/Document#collect_namespaces-instance_method
A much better solution. You could use this once to identify the namespaces (say in irb) and hard-code them.
OR
Use it at runtime, and supply it as the second argument to https://www.rubydoc.info/github/sparklemotion/nokogiri/Nokogiri/XML/Searchable#xpath-instance_method