Values in XPath results as separate column

Are you missing a feature? Request it's implementation here.
daliboris
Posts: 18

Values in XPath results as separate column

Sat Jun 04, 2011 7:53 am

It would be helpful to have one more column for text representation of node in window with result of XPath query. Now there is column "Description", which combines XPath with value of the node - like this "/w:document[1]/w:body[1]/w:p[107]/w:r[3]/w:sym[1]/@w:char - F063" (the query was "//w:sym/@w:char"). If there would be one column called (for example) "Value" with values like "F063", then I could sort only these values.
adrian
Posts: 2488

Re: Values in XPath results as separate column

Mon Jun 06, 2011 12:33 pm

Hello,

Thank you for the feedback.

Most of the XPath expression evaluation results are nodesets so they are displayed as a list of XPath paths(each pointing to a node). Attributes are treated specially in the results in order to present their value as well(the XPath would not contain their value). The problem here is that the results pane is generic. This means it's used to represent errors/warnings, find results, XPath results. Maybe in the long term we can accommodate this XPath specific column.

I've added a feature request for this to our issue tracking tool. It will be analyzed and if found appropriate it will be implemented in a future version of Oxygen(in the long term).

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Radu
Posts: 6044

Re: Values in XPath results as separate column

Tue Jul 10, 2012 4:29 pm

Hi,

In Oxygen 14.0 which was released a couple of weeks ago the results presented for an XPath evaluation have an extra XPath location column.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
agccheung
Posts: 1

Re: Values in XPath results as separate column

Fri Nov 30, 2012 7:01 pm

We are using oXygen 14.1 and can't seem to find an easy way to copy the results of an xpath as text. It would help if we could just highlight the result set and copy to text.
Costin
Posts: 504

Re: Values in XPath results as separate column

Fri Nov 30, 2012 11:19 pm

Hello,

After applying an XPath, if you click a result from the results view, the appropriate node corresponding to the XPath will be selected, therefore you could easily copy it, or you could copy its XPath location, using the context menu > Copy XPath.

Also, if you right click an item in the results view and choose "Show message", you could easily copy the information you want, such as "Description", "XPath location", etc., as well as navigate up and down through the results.

More than that, you could save the entire results, by right clicking an item in the results view and choosing "Save Results", or "Save Results as XML".
Costin Sandoi
oXygen XML Editor and Author Support
patrick
Posts: 96

Re: Values in XPath results as separate column

Tue Feb 19, 2013 5:28 pm

Hi,
is there an option to copy all unshortened values from the result pane without the additional information?

Example: Searching for all title in a document and get a list into the clipboard which contains the whole content of one title per line?

Thanks,
Patrick
adrian
Posts: 2488

Re: Values in XPath results as separate column

Fri Feb 22, 2013 7:24 pm

Hello,

Unfortunately, from the Oxygen results you can only copy the values together with the location and systemID information.

An XQuery or an XSLT stylesheet is more appropriate for obtaining a formatted result like you want.

Here's a simple XQuery that does this. You can run it in the XPath/XQuery Builder (Window > Show View):

Code: Select all

for $i in /xpath/to/title/text()
return concat($i, '
')

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
patrick
Posts: 96

Re: Values in XPath results as separate column

Tue Feb 26, 2013 4:41 pm

Hi Radu,

Thanks for your answer, but XSLT an XQuery is too difficult or time consuming for most of our users. Therefore it could be very helpful to have the ability to copy plain text from the result pane to get the identical output like the xyquery does.

For some users XQuery could be a solution. But - is it possible to search in multiple documents / a folder with xquery?

Thanks,
Patrick
adrian
Posts: 2488

Re: Values in XPath results as separate column

Tue Feb 26, 2013 5:36 pm

Hi,

I'll log a request on our issue tracking tool to allow the copy of the results description as plain text.

Any XPath can be executed as XQuery, so everything that's possible in XPath is also possible in XQuery (and a lot more).

I'm guessing you want to use a collection on a folder, so yes, you can do something similar with XQuery.

Code: Select all

for $i in collection('file:/D:/url/to/my/files/?select=*.xml;recurse=yes')//title/text()
return concat($i, '
')

This returns on each row the text from each title element from all the .XML files from the folder 'D:/url/to/my/files'.
If you have difficulties obtaining the correct URL of the folder, add it to the Oxygen project, right click on it in the Project view and from the popup menu choose "Copy Location".

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
patrick
Posts: 96

Re: Values in XPath results as separate column

Wed May 21, 2014 2:19 pm

Hi Radu,

now, in version 16, there is a comfortable search for XPath-Results in Projects, all opened files etc. - this is a great feature!

But most of the time we need to copy only the plain values in a list (value\n value\n...) like requested some posts above. Is it possible to add this feature in the next release? Maybe just a second "Copy values" menu item which cleans result text with a regex expression.

Thanks,
Patrick
adrian
Posts: 2488

Re: Values in XPath results as separate column

Thu May 22, 2014 3:43 pm

Hello Patrick,

We have your feature request logged on our issue tracking tool. I gave it a nudge.

Meanwhile, I provided a simpler workaround for copying the entire XPath column (via the Grid mode) here:
Copy column data from XPath results viewer?

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
sorin_carbunaru
Site Admin
Posts: 192

Re: Values in XPath results as separate column

Mon Mar 19, 2018 3:03 pm

Hello everyone,

I just wanted to update this thread by saying that in oXygen 20, in the contextual menu of the "Results" panel, there is now an action that copies the description text of the selected items.

All the best wishes,
Sorin Carbunaru
oXygen XML

Return to “Feature Request”

Who is online

Users browsing this forum: No registered users and 0 guests