Displaying a Node and its Descendants as xpaths
Oxygen general issues.
-
- Posts: 3
- Joined: Thu Jan 19, 2012 8:24 pm
Displaying a Node and its Descendants as xpaths
Post by pcstockman »
I would like to select a node and display it as a series of xpaths, one for each of the terminal descendants. Ideally I would also like to capture this information in a text file for further processing. Is this possible to do?
Peter
Peter
Re: Displaying a Node and its Descendants as xpaths
Hello,
I'm not sure if I understood the exact result that you want to obtain. An example could be helpful.
If you want the XPaths of all the leaf elements for a given element you can use the XPath toolbar or XPath builder from Oxygen.
Execute this expression:
You will get a result in Oxygen results panel and you can save that either as text or XML. One of the fields(description) from the results contains the XPath of each element. The result is of the form:
XPath - content
e.g.
Regards,
Adrian
I'm not sure if I understood the exact result that you want to obtain. An example could be helpful.
If you want the XPaths of all the leaf elements for a given element you can use the XPath toolbar or XPath builder from Oxygen.
Execute this expression:
Code: Select all
//element_name//*[not(descendant::*)]
XPath - content
e.g.
Code: Select all
<incident>
<description>/personnel[1]/person[1]/name[1]/given[1] - Big</description>
<systemID>file:/D:/projects/eXml/samples/personal.xml</systemID>
<location>
<start>
<line>9</line>
<column>13</column>
</start>
<end>
<line>9</line>
<column>31</column>
</end>
</location>
</incident>
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
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