Truncated strings in xpath result export

Oxygen general issues.
mvdwoord
Posts: 3
Joined: Wed Jan 25, 2017 3:11 pm

Truncated strings in xpath result export

Post by mvdwoord »

Hi,

I am trying to export some results from an XPath expression. The expression returns a set of results, if I copy or export them, the strings are truncated :(

Example:

Code: Select all

						<settings>
<username/>
<password encrypted="yes"/>
<usescript>yes</usescript>
<source>Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010

Get-MailboxDatabaseCopyStatus -Server $[DAGMemberServer1] | where{$_.ActivationPreference -eq 4} | Suspend-MailboxDatabaseCopy -ActivationOnly
Get-MailboxDatabaseCopyStatus -Server $[DAGMemberServer2] | where{$_.ActivationPreference -eq 4} | Suspend-MailboxDatabaseCopy -ActivationOnly
Get-MailboxDatabaseCopyStatus -Server $[DAGMemberServer3] | where{$_.ActivationPreference -eq 4} | Suspend-MailboxDatabaseCopy -ActivationOnly
Get-MailboxDatabaseCopyStatus -Server $[DAGMemberServer4] | where{$_.ActivationPreference -eq 4} | Suspend-MailboxDatabaseCopy -ActivationOnly</source>
When a bunch of these <source> elements are selected via XPath:

Code: Select all

//tasks/task[properties/type/text()='PWRSHELL']/settings[timeout/text()='10']/source/text()
I get 33 results, if I select all and copy or export as xml the above *should* match the full contents of the script tab, however I get this back in the export xml:

Code: Select all

<report xmlns="http://www.oxygenxml.com/ns/report">
<incident>
<description>Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 Get-MailboxDatabaseCopyStatus -Server $[DAGMemberServer1] | where{$_.ActivationPreference -eq 4} | Suspend-MailboxDatabaseCopy -ActivationO ...</description>
<xpath_location>/AutomationManager[1]/buildingblock[1]/modules[1]/module[4]/tasks[1]/task[2]/settings[1]/source[1]/text()[1]</xpath_location>
<systemID>/Users/maarten/Projects/BBReport/projects_na2 install and config.xml</systemID>
<location>
<start>
<line>3318</line>
<column>16</column>
</start>
<end>
<line>3323</line>
<column>143</column>
</end>
</location>
</incident>
As you can see, the results are truncated ( ... ). How can I get the full, untruncated results back?

Also, will the issue as mentioned in topic7071.html ever be implemented? I.e. so we can copy, hopefully non-truncated, results as a column??
Radu
Posts: 8992
Joined: Fri Jul 09, 2004 5:18 pm

Re: Truncated strings in xpath result export

Post by Radu »

Hi,

So:
As you can see, the results are truncated ( ... ). How can I get the full, untruncated results back?
We have a limitation of about 200 characters for each xpath result we present. We do not have a setting for this, I will add an internal issue either to increase the limit to a much larger amount of text or maybe add a setting for this.
In the meantime you can create an XQuery holding your xpath and create a transformation scenario to run the XQuery against the XML. The xquery execution results should show all the nodes, and for each their entire serialized content.
Also, will the issue as mentioned in topic7071.html ever be implemented? I.e. so we can copy, hopefully non-truncated, results as a column??
I found the issue we have opened on our side, I will try to increase its priority. It seems we had users who use the "Find All" or "Find in Files" and wanted the same thing, to save the description column from the results.
We have the idea to add a "Copy descriptions" contextual menu action which would copy all the descriptions to the clipboard (separated probably by a new line). In the meantime you can save all results to XML and apply an XSLT stylesheet to filter out the parts that you want.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
mvdwoord
Posts: 3
Joined: Wed Jan 25, 2017 3:11 pm

Re: Truncated strings in xpath result export

Post by mvdwoord »

Thanks for the reply, I will keep an eye out for the updated functionality. In the mean time I will see if I can somehow integrate XQuery transformations into my workflow.
A setting would indeed be best, I can imagine some sort of a safety line but it would be nice to be able to override.

As for the other issue, I'd much prefer to be able to copy any column, rather than just the description.
Radu
Posts: 8992
Joined: Fri Jul 09, 2004 5:18 pm

Re: Truncated strings in xpath result export

Post by Radu »

Hi,

Maybe a contextual menu action to "Copy current column details" for the selected results?
As an end user I think I would find this most intuitive if I could click the column header and select everything but in our case we use clicks on the column header to sort the table.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
mvdwoord
Posts: 3
Joined: Wed Jan 25, 2017 3:11 pm

Re: Truncated strings in xpath result export

Post by mvdwoord »

Something along those lines. Not sure what's best UI/UX wise, sorting is definitely something I would not want to lose. Perhaps a contextual menu in the results with options copy/export column data alongside the current Print/Save/Save results as XML ??
Radu
Posts: 8992
Joined: Fri Jul 09, 2004 5:18 pm

Re: Truncated strings in xpath result export

Post by Radu »

Hi,

Yes, something like this, although it does not seem to make sense for most columns. Why would you copy the location column or the resource column?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply