title: sed, awk to replace xml elements
body: <p>i have an xml file, file.xml </p>
  
  <p>like below:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;bookstore&gt;
  
  &lt;book category="cooking"&gt;
    &lt;title lang="en"&gt;Everyday Italian&lt;/title&gt;
    &lt;author&gt;Giada De Laurentiis&lt;/author&gt;
    &lt;year&gt;2005&lt;/year&gt;
    &lt;price&gt;30.00&lt;/price&gt;
  &lt;/book&gt;
  
  &lt;book category="children"&gt;
    &lt;title lang="en"&gt;Harry Potter&lt;/title&gt;
    &lt;author&gt;J K. Rowling&lt;/author&gt;
    &lt;year&gt;2005&lt;/year&gt;
    &lt;price&gt;29.99&lt;/price&gt;
  &lt;/book&gt;
  
  &lt;book category="web"&gt;
    &lt;title lang="en"&gt;XQuery Kick Start&lt;/title&gt;
    &lt;author&gt;James McGovern&lt;/author&gt;
    &lt;author&gt;Per Bothner&lt;/author&gt;
    &lt;author&gt;Kurt Cagle&lt;/author&gt;
    &lt;author&gt;James Linn&lt;/author&gt;
    &lt;author&gt;Vaidyanathan Nagarajan&lt;/author&gt;
    &lt;year&gt;2003&lt;/year&gt;
    &lt;price&gt;49.99&lt;/price&gt;
  &lt;/book&gt;
  
  &lt;book category="web"&gt;
    &lt;title lang="en"&gt;Learning XML&lt;/title&gt;
    &lt;author&gt;Erik T. Ray&lt;/author&gt;
    &lt;year&gt;2003&lt;/year&gt;
    &lt;price&gt;39.95&lt;/price&gt;
  &lt;/book&gt;
  
  &lt;/bookstore&gt;
  </code></pre>
  
  <p>from which, i need to replace all values found in fileA.txt, with the ones found in fileB.txt    </p>
  
  <p>example of fileA.txt:</p>
  
  <pre><code>500
  345
  623
  etc
  </code></pre>
  
  <p>values to be searched for</p>
  
  <p>example of fileB.txt:</p>
  
  <pre><code>550
  350
  700
  etc
  </code></pre>
  
  <p>so <code>&lt;price&gt;500&lt;/price&gt;</code> should become <code>&lt;price&gt;550&lt;/price&gt;</code></p>
  
  <p>I can run multiple times the below command, </p>
  
  <pre><code>sed -i 's/old/new/g' file.xml,
  </code></pre>
  
  <p>could you please show me a more clever way, in order to specify for example that the replacement must take only place in the  tag, and that if i need to replace 500 with 600, then 5000 will not become 6000?</p>
  
  <p>Perhaps a python script would be preferred?</p>
  
  <p>As in the comments, could you show me a python way, since i may be using the wrong tools, for the task?</p>