Delete all the comments in one go in oXygen Author
Questions about XML that are not covered by the other forums should go here.
Re: Delete all the comments in one go in oXygen Author
In text mode, you could use a regular expression to do a find/replace, like this:
https://i.imgur.com/Lf1oTSD.png
Check the "Regular expression" box in the bottom right. Then search for:"
<!--.*-->
and replace with nothing.
https://i.imgur.com/Lf1oTSD.png
Check the "Regular expression" box in the bottom right. Then search for:"
<!--.*-->
and replace with nothing.
Re: Delete all the comments in one go in oXygen Author
Hi,
And if you want to remove all comments in one or multiple files, in the Oxygen main menu Tools->XML Refactoring there is a Delete comments operation which can be performed on multiple files.
Regards,
Radu
And if you want to remove all comments in one or multiple files, in the Oxygen main menu Tools->XML Refactoring there is a Delete comments operation which can be performed on multiple files.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Thu Sep 26, 2019 3:50 pm
Re: Delete all the comments in one go in oXygen Author
Post by Stereotaxis »
Looking forward to see the suggestions of others.
Re: Delete all the comments in one go in oXygen Author
Hello, I read your messages about the tool : XML Refactoring > Delete comments but when I try to use it I don't understand how it's working.
May you tell me more about that ? Is there a tutorial or documentation ?
Best regards
May you tell me more about that ? Is there a tutorial or documentation ?
Best regards
Re: Delete all the comments in one go in oXygen Author
Hi,
We have some general documentation about the XML refactoring actions:
https://www.oxygenxml.com/doc/versions/ ... tools.html
but we do not have particular documentation about the action to delete comments.
Once you choose to use the "Delete comments" action, you need to configure an XPath expression for the XML elements from which the comments should be removed. If you want to delete all comments found in the XML file, the "Element" field can take the value *.
Then you choose a set of files over which should be modified and you can preview the changes instead of applying them directly.
If this does not work for you maybe you can tell me step by step what you are doing on your side and what the desired result should be.
Regards,
Radu
We have some general documentation about the XML refactoring actions:
https://www.oxygenxml.com/doc/versions/ ... tools.html
but we do not have particular documentation about the action to delete comments.
Once you choose to use the "Delete comments" action, you need to configure an XPath expression for the XML elements from which the comments should be removed. If you want to delete all comments found in the XML file, the "Element" field can take the value *.
Then you choose a set of files over which should be modified and you can preview the changes instead of applying them directly.
If this does not work for you maybe you can tell me step by step what you are doing on your side and what the desired result should be.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Delete all the comments in one go in oXygen Author
Thanks Radu for your answer,
I am not used to use XML and I don't know XPath but your advice with * works very well.
Now my XML file has many empty spaces or white lines.
Is there a way to delete those empty spaces or to avoid it when I use the tool ?
I would like a clean XML file.
(Sorry for my english I am french).
Thanks.
Regards
I am not used to use XML and I don't know XPath but your advice with * works very well.
Now my XML file has many empty spaces or white lines.
Is there a way to delete those empty spaces or to avoid it when I use the tool ?
I would like a clean XML file.
(Sorry for my english I am french).
Thanks.
Regards
Re: Delete all the comments in one go in oXygen Author
Hi,
The refactoring operating which removes XML comments will not format and indent the XML document as a result of the XML comments being removed.
If you want to format and indent the XML files, you can either open them in Oxygen and use the "Format and indent" toolbar action or you can add in the Oxygen Project view a folder containing all the XML files, right click the folder and choose Format and indent files.
Regards,
Radu
The refactoring operating which removes XML comments will not format and indent the XML document as a result of the XML comments being removed.
If you want to format and indent the XML files, you can either open them in Oxygen and use the "Format and indent" toolbar action or you can add in the Oxygen Project view a folder containing all the XML files, right click the folder and choose Format and indent files.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “General XML Questions”
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