Replacing Multi Line XML tags inside a XML file using sed command

I am writting a shell script to replace a passage of xml tags inside a XML file using sed command. This is my .sh file


for f in /home/Desktop/apis/*.xml;
    echo "$f";
varA=$(sed -n '/<request>/,/<\/request/p' $f)
echo "$varA";
varB=$(echo "$varA" | sed '/<send/i\'"$CONTENT_B" )
echo "$varB";
varC=$(sed -i 's/$varA/$varB/g;' $f)
echo "********:$varC";

What I have done in the above script is First I extracted the required multi line tags from the xml file and assigned it to varA. Next I wanted to add few more tags to that extracted tags and final output is assigned to varB.

Next I want to replace value of varA with varB within the xml file. Although I used sed command of varC=$(sed -i 's/$varA/$varB/g;' $f), it doesn't replace the original set of tags. Please help me to proceed.