Menu

How to add comments to XML file

Help
Anonymous
2012-05-18
2013-03-13
  • Anonymous

    Anonymous - 2012-05-18

    How can I script the addition of a comment to an XML file with XMLStarlet?

     
  • Noam Postavsky

    Noam Postavsky - 2012-05-23

    Unfortunately, XMLStarlet isn't capable of that right now.

     
  • Alexey Shtykov

    Alexey Shtykov - 2012-05-25

    Hello,
    That's an interesting feature, but would You be so kind to provide more details about it.
    Usage: Inserting comments at the begin/end of XML file? Commenting some nodes by a pattern? Somewhat else?
    And/or purpose: Why do You need this feature?

     
  • Alexey Shtykov

    Alexey Shtykov - 2012-05-31

    In the case of no answer until June 01 2012 this feature will look like this:

    xml ed -i -t comment -n '' -v 'comment contents here'
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.