Page 1 of 1
"From Selected Element" XPath view option
Posted: Tue May 18, 2004 6:29 pm
It would be nice to have an option to calculate XPath expression in XPath view using current selected element as XPath context.
It may be also useful to view current node XPath (in separate view or popup window).
Posted: Fri May 21, 2004 12:28 pm
You can do this if you switch to the debugging perspective. You can use your XML file and an empty stylesheet for debugging scenario. Then put the cursor on the line containing the element you want to be the current element and choose the run to cursor action. Then go to the XWatch view and enter the XPath expressions you want to be evaluated in that node. The selected node is available in the Context view. If an XPath entered in the XWatch view evaluates to a NodeSet you will see the nodes in the NodeSet view (in the right part). Clicking on a node will highlight it in the document.
Hope that helps,
Re: "From Selected Element" XPath view option
Posted: Fri Dec 15, 2017 4:51 pm
There's a settings icon next to the Xpath input form, where you can choose 'XPath update on cursor move' which will create a XPath anytime you click anywhere in the document.