How to read <#comment> element in editor
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 93
- Joined: Mon Aug 08, 2022 2:32 pm
How to read <#comment> element in editor
Post by SmitaPatil »
Hi Team,
We have inserted a comment node (<!-- comment -->) in xml file and in oxygen xml editor it is displaying as <#comment> element. We want to read the xpath for <#comment> element and make count of it. However it is being save as <!-- --> in xml file. Can you please guide me how to do it ?
Thanks,
Smita
We have inserted a comment node (<!-- comment -->) in xml file and in oxygen xml editor it is displaying as <#comment> element. We want to read the xpath for <#comment> element and make count of it. However it is being save as <!-- --> in xml file. Can you please guide me how to do it ?
Thanks,
Smita
-
- Site Admin
- Posts: 125
- Joined: Wed Dec 12, 2018 5:33 pm
Re: How to read <#comment> element in editor
Post by Cosmin Duna »
Hi Smita,
This XPath can be used for matching all comments from your document: //comment()
For counting them you can use this one: count(//comment())
You can use the XPath Builder view from Oxygen for composing complex XPath expressions and executing them over the currently edited XML document: https://www.oxygenxml.com/doc/versions/ ... -view.html
Best regards,
Cosmin
This XPath can be used for matching all comments from your document: //comment()
For counting them you can use this one: count(//comment())
You can use the XPath Builder view from Oxygen for composing complex XPath expressions and executing them over the currently edited XML document: https://www.oxygenxml.com/doc/versions/ ... -view.html
Best regards,
Cosmin
Cosmin Duna
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
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