I had to install an xml config file on a bunch of servers.
The xml was the same for every server except the hostname had to be added to a specific field.

My first thought was to use sed, but anyone who has tried parsing xml with regex knows just how far I got.

Searching for something like sed that understood xml tags led me to xmlstarlet.
Here is the command I used to add the hostname of the server to the xml path "info/host-id":

    xmlstarlet ed --inplace  -u info/host-id -v `hostname -f` /path/to/info.xml