Looking for a way to change the values of node in an xml file using shell.
Example of data in xml file:
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:postgresql://myhost/metastore</value>
</property>
Based on <name> node, change the text in <value> node. Is it achievable through sed or xmlstarlet.
What I want is like based on <name> = javax.jdo.option.ConnectionURL, change <value> to Banana, so the output would be:
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>Banana</value>
</property>
Thanks in advance