title: CMD Find and Replace with User input with xml file
body: <p>I am in need of some help.  I have a batch file that randomly creates names for any set.
  This all works well as it should.  </p>
  
  <p>I also have the batch program to read an xml file to pull specific nodes within the xml.  What I need to do is have the batch update the xml node with the pre selected random names.</p>
  
  <p>here is some of my code:</p>
  
  <pre><code>::Start Random Names
  
  Set EBSTA1=%Random%
  if /i %EBSTA1% GTR 11 goto EBSTA
  If /i %EBSTA1% LSS 1 goto EBSTA
  goto Weststa1
  :Weststa1
  If %EBSTA1% == 1 set EBSTA2=NEBO
  If %EBSTA1% == 2 set EBSTA2=YR
  If %EBSTA1% == 3 set EBSTA2=DV
  If %EBSTA1% == 4 set EBSTA2=BAR
  If %EBSTA1% == 5 set EBSTA2=BOR
  If %EBSTA1% == 6 set EBSTA2=MOJ
  If %EBSTA1% == 7 set EBSTA2=PPG
  If %EBSTA1% == 8 set EBSTA2=PAR
  If %EBSTA1% == 9 set EBSTA2=BAK
  If %EBSTA1% == 10 set EBSTA2=EDW
  If %EBSTA1% == 11 set EBSTA2=TEH
  </code></pre>
  
  <p>of course I have it echoing out %EBSTA2% </p>
  
  <p>here is my find and replace, which works sort of..</p>
  
  <pre><code>set str=%EBSTA2%
  Echo. %str%
  set str=%str:%%EBSTA2% 
  Echo %str%
  (
  Echo(^&lt;destinationTag^&gt;%str%^&lt;/destinationTag^&gt;
  )&gt;&gt;"test.xml"
  </code></pre>
  
  <p>what would be the way to update the destinationTag with the new string from the random?</p>
  
  <p>Thanks in advance</p>