title: Regex to find attribute in xml tag and replace its value (node/Javascript)
body: <p>I have a Cordova config.xml file and I'm writing a script to bump up the version. A sample of the file is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;widget android-packageName="com.demo.android" id="com.demo.ios" ios-CFBundleIdentifier="com.demo.ios.dev" version="1.16.6" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0"&gt;
      &lt;name short="DEMO DEV"&gt;DEMO&lt;/name&gt;
  </code></pre>
  
  <p>I want to replace the value of the attribute <code>version</code> that is inside the <code>&lt;widget&gt;</code> tag, but without affecting at all any other attribute, including the one in the <code>&lt;?xml</code> tag.</p>
  
  <p>So, simply put, find and replace the value of the attribute <code>version</code> inside the <code>widget</code> tag.</p>