How to read <#comment> element in editor

Having trouble installing Oxygen? Got a bug to report? Post it all here.
SmitaPatil
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
Cosmin Duna
Site Admin
Posts: 120
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
Cosmin Duna
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply