Open ashahabov opened 1 year ago
The Goto XPath command just manages simple XPath steps - not full XPath expressions.
The standard VS Code Goto Symbol command is probably the closest to what you need.
After pressing Shift-CMD-O and entering div
in the edit window you should something like the screenshot below:
You can then navigate the dropdown list of div
symbols. The outline (tree) view and breadcrumbs views offer other navigation methods.
Admittedly, these methods aren't too useful if you have a very large number of div elements and you want, for example, the 298th div
element selected.
Another approach would be to use the companion XPath Notebook extension - unfortunately a recent change in VS Code broke direct navigation of XPath results (I've submitted an issue to fix this) but in the mean time you could copy and paste the generated XPath /html[1]/section[1]/section[1]/div[1]
into the Goto XPath edit window:
For example, the XPath
/body//div
returns a collection with 10 elements. Is it possible to go to the 3rd element from this collection?XML: Goto XPath -> (/body//div)[3] doesn't work.