title: Replace dynamic content in XML file
body: <p><strong>Quick Summary:</strong> I need to create a Bash script to change the text within a node automatically every week. The script will match the node and replace the text inside them (if this is possible)? How would I do this?</p>
  
  <p><strong>Long Summary:</strong>
  I host a Minecraft server which has shops, each of which have their own .xml file in the /ShowcaseStandalone/ffs-storage/ directory. Every Sunday my server restarts and executes several commands into the terminal to reset several things. One thing that I am trying to make change is one of the shops. I am wanting to change the text in the node &lt;itemstack&gt; and the text in the node &lt;price&gt;. I am simply wanting to take text from a .txt file in a different folder, and insert it into that node. The problem is, that the text in the node will change every week. Is there any way to replace a specific line or text within two nodes using bash?</p>
  
  <p><strong>XML file:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;scs-shop usid="cac8480951254352116d5255e795006252d404d9" version="2" type="storage"&gt;
      &lt;enchantments type="string"/&gt;
      &lt;owner type="string"&gt;Chadward27&lt;/owner&gt;
      &lt;world type="string"&gt;Frisnuk&lt;/world&gt;
      &lt;itemStack type="string"&gt;329:0&lt;/itemStack&gt;
      &lt;activity type="string"&gt;BUY&lt;/activity&gt;
      &lt;price type="double"&gt;55.0&lt;/price&gt;
      &lt;locX type="double"&gt;487.5&lt;/locX&gt;
      &lt;locY type="double"&gt;179.0&lt;/locY&gt;
      &lt;locZ type="double"&gt;-1084.5&lt;/locZ&gt;
      &lt;amount type="integer"&gt;0&lt;/amount&gt;
      &lt;maxAmount type="integer"&gt;0&lt;/maxAmount&gt;
      &lt;isUnlimited type="boolean"&gt;true&lt;/isUnlimited&gt;
      &lt;nbt-storage usid="23dffac5fb2ea7cfdcf0740159e881026fde4fa4" version="2" type="storage"/&gt;
  &lt;/scs-shop&gt;
  </code></pre>
  
  <p><strong>Operating System:</strong> Linux Ubuntu 12.04</p>