I want to update a XML element value using go-libxml2. The element may occur anywhere in the XML document. For example in the following XML I want to update a element
<?xml version="1.0" encoding="UTF-8"?>
- <note>
<to>Tove</to>
<from>Jani</Ffrom>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
<url>http://example.com</url>
<links>
<url>http://link1.com</url>
<url>http://link2.com</url>
</links>
</note>
I want to add a additional query parameters in all values. So my resultant xml will be as follows
<?xml version="1.0" encoding="UTF-8"?>
- <note>
<to>Tove</to>
<from>Jani</Ffrom>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
<url>http://example.com?param=value</url>
<links>
<url>http://link1.com?param=value</url>
<url>http://link2.com?param=value</url>
</links>
</note>
How to use go-libxml2 to modify XML?