xmllint command line should support --setns in order to allow for applying XPath to xml with default namespaces
I recently had a situation where xmllint --xpath
was inexplicably not correctly executing the query when every other tool I tried worked.
I found an example showed using shell to use setns
to provide an alias for the specified namespace and then it worked.
I believe that by providing for an argument named --setns <alias> <namespace-uri>
that can be used multiple times, will resolve many issues without having to resort to using the shell with simulated inputs.
It will also be great if the default namespace is used when the provided XPath doesn't address elements using <element>
instead of <alias>:<element>