replace a similar field in a file

Hello,
I am having a file where I have to replace the port values with the variable I defined.
The file is an extract of an xml file:
<NameValuePair>
<name>Service1</name>
<value>tcp:32406</value>
</NameValuePair>
<NameValuePair>
<name>Service2</name>
<value>32406</value>
</NameValuePair>
<NameValuePair>
<name>Service3</name>
<value>tcp:32480</value>
</NameValuePair>
<NameValuePair>
<name>Service4</name>
<value>32480</value>
</NameValuePair>

I have Port1=7001 ; Port2=7011 ; I need to replace Port1 for Service1 and Service2 ports and Port2 for Service3 and Service4.
I know to replace it with `sed` but I am not able to grep for that <value> line as there are multiple places. The services are unique but not sure how to go to the next <value> string associated with the Service.

I need help and really appreciate your ideas.
Chiru

sed "/Service1/{n;s/[0-9][0-9]*/$Port1/;}" file

Thanks Anbu, it's working!!