title: How to search for specific word in xml file in windows command
body: <p>I have following content in my file:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Include&gt;
      &lt;?define MajorVersion = "2" ?&gt;
      &lt;?define MinorVersion = "5" ?&gt;
      &lt;?define BuildNumber = "64" ?&gt;
      &lt;?define RevisionNumber = "0" ?&gt;
      &lt;?define FullVersion = "$(var.MajorVersion).$(var.MinorVersion).$(var.BuildNumber).$(var.RevisionNumber)"?&gt;
  &lt;/Include&gt;
  </code></pre>
  
  <p>I want to read this file during PostBuild or AfterBuild event in c#. As access to windows commands are available during this event, I am trying to use cmd to read variables value defined in it i.e. value of <strong>"MajorVersion", "MinorVersion", "BuildNumber" and "RevisionNumber"</strong>. Then I will run the command to rename a folder using these variables. How could I read those specific values in cmd prompt/batch?</p>
  
  <p>For the file content I posted above, I want folder to be renamed to "2.5.64.0".</p>
  
  <p>I looked into this solution - <a href="https://stackoverflow.com/questions/25849211/read-xml-file-with-windows-batch">Read XML file with windows batch</a>
  In the above link, value is present between two nodes but in my case values are present as attribute's value.</p>