"From Selected Element" XPath view option

Are you missing a feature? Request its implementation here.
LuciR
Posts: 3
Joined: Tue May 18, 2004 6:18 pm
Contact:

"From Selected Element" XPath view option

Post by LuciR »

:idea: It would be nice to have an option to calculate XPath expression in XPath view using current selected element as XPath context.
:idea: It may be also useful to view current node XPath (in separate view or popup window).
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

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,
George
vaasha
Posts: 1
Joined: Fri Dec 15, 2017 4:49 pm

Re: "From Selected Element" XPath view option

Post by vaasha »

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.
Post Reply