microsoft / ApplicationInspector

A source code analyzer built for surfacing features of interest and other characteristics to answer the question 'What's in the code?' quickly using static analysis with a json based rules engine. Ideal for scanning components before use or detecting feature level changes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support XPath in XML Documents with Namespaces Specified

gfs opened this issue · comments

Is your feature request related to a problem? Please describe.
The current implementation of the XPath queries from #420 doesn't support XML documents which specify a namespace.

Describe the solution you'd like
Options:

  1. Somehow automatically parse the namespaces from the XML
  2. Add a field for users to specify namespaces to use for the query
  3. Strip the namespaces and treat elements as local

Additional context
See #420 for samples which work without namespace and fail to work with namespace. I've done some quick experiments but have not cracked how to properly associate the namespace. Once namespaces are supported they will also have to be specified when relevant in the xpath query itself. Might also require some better error handling around loading namespaces and queries.