I am looking around to see if anyone is aware of XPath builders out there.
We have a usecase where a user needs to fill in an XPath into a form
field. We'd like to have a dialog box that helps the user build such an
expression given a schema. I figure this has been implemented at least a
hundred times already. Is anyone aware of examples XPath builders
(especially ones that you like). I am interested in all examples (not just
ones that are open source or ones that can run in Eclipse).
Konstantin Komissarchik wrote:
> I am looking around to see if anyone is aware of XPath builders out
> there. We have a usecase where a user needs to fill in an XPath into a
> form field. We'd like to have a dialog box that helps the user build
> such an expression given a schema. I figure this has been implemented at
> least a hundred times already. Is anyone aware of examples XPath
> builders (especially ones that you like). I am interested in all
> examples (not just ones that are open source or ones that can run in
> Eclipse).
The org.eclipse.wst.xml.xpath.core plugin that just was added to 3.1,
has a calculateXpathToNode() static method you can use. Given a DOM
Node, it will give you the direct XPath to it.
Konstantin Komissarchik wrote:
> I am looking around to see if anyone is aware of XPath builders out
> there. We have a usecase where a user needs to fill in an XPath into a
> form field. We'd like to have a dialog box that helps the user build
> such an expression given a schema. I figure this has been implemented at
> least a hundred times already. Is anyone aware of examples XPath
> builders (especially ones that you like). I am interested in all
> examples (not just ones that are open source or ones that can run in
> Eclipse).
BTW, you may also want to check out the XPath view, in the
org.eclipse.wst.xml.xpath.ui plugin as well.