[Bug] Unable to add colon to XPath queries
- Dominant language
- TypeScript
- Stars
- 40k
- Forks
- 2.4k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
**Description**
While receiving an XML response and attempting to filter the response using XPath, if the path contains a colon inside of it, "Invalid XPath query" error will be thrown, although it is a valid path, for example _//s:path_
**Example**
The following response is impossible to query:
If now I will query the following:
//s:Envelope
I will get the Invalid XPath query error.
**Info**
According to the XPath 3.1 documentation and according to various desktop and online XML editors it is a valid query.
Though from what I understand, the [npm package](https://www.npmjs.com/package/xpath) xpath is using XPath1.0, might that be the issue?
Contributor guide
Research direction
Start by locating the response-filtering code that validates XPath queries and reproduce the reported //s:Envelope case using the npm xpath dependency. Done means a valid namespaced XPath no longer raises “Invalid XPath query”; run the relevant test suite and add coverage if the project has tests for this behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100