Automated replacement of HTML Tags

Hi All,

I use a utility to generate a xml file....which looks something as follows

<xml>
<name>some name</name>
<value>some value</value>
<machine>rocker</machine>
</xml>

I would like to run a KSH script which will replace this machine tag value 'rocker' to say 'docker'.
I would like to pass a text file with these replacement variables to this original xml file to the Unix script and replace all occurences of the machine tag in the file with the values inside the text file.

Thanks for your help in advance
ciao.

This is a verbose way of doing it but it ensures that any replacements are exact as intended....

$ sed 's!\(<machine>\)rocker\(</machine>\)!\1docker\2!' foo.xml
<xml>
<name>some name</name>
<value>some value</value>
<machine>docker</machine>
<name>some name</name>
<value>some value</value>
<machine>docker</machine>
</xml>

Cheers
ZB