I want to replace the host id in number of files and the host id is different in each file, so I have to replace the content between the tags <hostid> and </hostid>, each file has only one <hostid> line
<hostid>71342-231VMKDK-47WW-03dMV6</hostid>
to
<hostid>xxxx-yyyyy-zzz-uuu-bb</hostid>
I did try something like below which didn't work
sed -i "" -e :a -e 's/\(hostid>[X]*\)[^X]\(.*<\)/\1\something\</;ta'