Page 1 of 1

XPath from Grid

Posted: Tue Apr 27, 2010 11:34 am
by nickle
One nice feature of XMLSpy I can't see in oXygen is this.

In the xml grid view, select a cell. Then it should be possible to copy the xpath of that cell.

When transforming XML with xslt, its then quite easy to create the output, and paste in the selections from example data.

Nick

Re: XPath from Grid

Posted: Tue Apr 27, 2010 12:05 pm
by sorin_ristache
Hello,

Oxygen has this feature too. The XPath expression of the selected element is available in the combo box on the XPath toolbar. This combo box is updated with the XPath expression of the current element on every change of selection in the XML document. Just enable this feature of the XPath toolbar by pressing the toggle button XPath update on caret move which is located right next to the combo box on this toolbar. You copy the expression as in any combo box: select all content in combo, right click and select Copy from the popup menu.


Regards,
Sorin

Re: XPath from Grid

Posted: Tue Apr 27, 2010 12:52 pm
by nickle
Is this possible from Eclipse?

Re: XPath from Grid

Posted: Tue Apr 27, 2010 3:05 pm
by sorin_ristache
Hello,

If you are using the Eclipse plugin you have to switch to Text mode, right click on the element and select the action Copy XPath from the popup menu. The switch to Text mode is necessary because the XPath tool is available only as a dialog yet, not as a toolbar in Eclipse.


Regards,
Sorin