Example XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book>
<title lang="eng">Harry Potter</title>
<price>29.99</price>
</book>
<book>
<title lang="eng">Learning XML</title>
<price>39.95</price>
</book>
</bookstore>
I am using xpath on my shell to try and change the text value of an xml node. I would like to change Harry Potter to Game of Thornes.
xpath test.xml "//bookstore/book/title/text()" 2>/dev/null
Will echo out Harry Potter to my terminal. Now is it possible to use xpath to change the value of the node from Harry Potter to Game of Thornes?
Thanks!