In a recent issue discovered at xml-crypto it was discovered that if a string is passed for the node argument to select() and friends, it isn't first parsed into a Node, it just fails to find any matching nodes matching the xpath query, even though if the string were parsed into a Node first, it would have. This inconsistent behavior isn't checked for in the API. It seems that if a string is passed in the library should throw or should parse it first.
In a recent issue discovered at
xml-crypto
it was discovered that if a string is passed for thenode
argument toselect()
and friends, it isn't first parsed into aNode
, it just fails to find any matching nodes matching the xpath query, even though if the string were parsed into aNode
first, it would have. This inconsistent behavior isn't checked for in the API. It seems that if a string is passed in the library should throw or should parse it first.Referenced issue: https://github.com/node-saml/xml-crypto/pull/380
If desired I can create a PR to do which ever option seems better to you.