xmlstarlet is a great tool for working with XML files.
To change a value:
xmlstarlet edit --inplace --update "xpath" -v "NEW_VALUE" file.xml
To delete elements:
xmlstarlet edit --inplace --delete "xpath" file.xml
Source
Date: 2017-07-26
Tags: xml
Share: