title: How to update an XML string in a file?
body: <p>Platform: MacOS</p>
  
  <p>I've been struggling with getting <code>xmlstarlet</code> working and am out of ideas as to why it isn't performing my operation on the sample snippet below:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" standalone="no"?&gt; 
  &lt;application xmlns="http://ns.adobe.com/air/application/32.0"&gt;    
      &lt;filename&gt;Administrator&lt;/filename&gt;
  
      &lt;name&gt;Administrator&lt;/name&gt;
  
      &lt;versionLabel&gt;4.5.0&lt;/versionLabel&gt; 
      &lt;versionNumber&gt;1&lt;/versionNumber&gt; 
  
  &lt;/application&gt;
  </code></pre>
  
  <p>My ultimate goal is to have a script that is run by intelliJ before the build to auto-increment the <code>&lt;versionNumber&gt;</code> tag.</p>
  
  <p>It should read in the value, increment it, then write it back.</p>
  
  <p>Something I've done plenty of other times with plistbuddy on other Xcode projects, but using a plain .xml file and the recommended <em>xmlstarlet</em> has proven to be frustrating.</p>
  
  <p>Even just trying to write out the value in bash doesn't work for me:</p>
  
  <p><code>xmlstarlet sel -t -v "//versionNumber" ./Administrator-app.xml</code></p>
  
  <p>sed &amp; awk are really messy for this stuff, but have shown to provide some results.  What am I missing here?</p>