Copy result XML in XPath
Are you missing a feature? Request its implementation here.
Copy result XML in XPath
Currently when you save the XPath selection results, you get something like this:
I'd like to see the option to save the XML fragments selected by the expression. Give the source XML
expression "/*" should save:
Expression "//qux":
i.e. non-well-formed XML, entities separated by a line feed.
Expression "//@*":
Code: Select all
SystemID: C:\Program Files\Oxygen XML Editor 7.2\Untitled2.xml
Location: 2:0
Description: /foo[1]/@bar -
Code: Select all
<foo bar="baz">
<qux bar="quxx"/>
<qux bar="quxxx"/>
</boo>
Code: Select all
<foo bar="baz">
<qux bar="quxx"/>
<qux bar="quxxx"/>
</boo>
Code: Select all
<qux bar="quxx"/>
<qux bar="quxxx"/>
Expression "//@*":
Code: Select all
bar="baz"
bar="quxx"
bar="quxxx"
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
The XPath results just help you to find the location of the XPath query in the document by clicking on the lines of the XPath results view. The extraction that you need can be done with a simple stylesheet like:
You can replace the //qux filter with other XPath expression in xsl:for-each.
Regards,
Sorin
The XPath results just help you to find the location of the XPath query in the document by clicking on the lines of the XPath results view. The extraction that you need can be done with a simple stylesheet like:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xpath-result>
<xsl:for-each select="//qux">
<xsl:copy-of select="."/>
</xsl:for-each>
</xpath-result>
</xsl:template>
</xsl:stylesheet>
Regards,
Sorin
Yes, I can always do that but that would mean I'd have to e.g. switch to XSLT debugger, open the template below, change the expression to copy the stuff I need and then run the transformation. Being able to copy the results of XPath query would just make things faster in some cases. You already have "Save results..." to save the locations in text from, my feature suggestion was to be able to have "Save XML results...", or "Copy XML results to Scrach Buffer".
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service