The file that is given is not valid xml. You have to add opening and closing root tags. Like this:
<xml>
<controller-host></controller-host>
<controller-port></controller-port>
<tier-name></tier-name>
<node-name></node-name>
</xml>
With that input you can use an xml parser like xmlstartlet to edit the contents:
xmlstarlet ed -O -u //controller-host -v "AppDynamicsHost" \
-u //controller-port -v "80" \
-u //tier-name -v "the hostname" \
-u //node-name -v "tomcat server" file
edstart editing mode ofxmlstartlet-Oomit the<?xml version="1.0"?>declaration-uupdate the given xpath-vset the given value
The output would then be:
<xml>
<controller-host>AppDynamicsHost</controller-host>
<controller-port>80</controller-port>
<tier-name>the hostname</tier-name>
<node-name>tomcat server</node-name>
</xml>
To edit the file directly inplace you can use the -L flag.