title: Linq (C#) : how to replace element in xml
body: <p>I'd like to ask about how to replace element in xml for experts.</p>
  
  <p>The xml is like this,</p>
  
  <p>Source:</p>
  
  <pre><code>&lt;root&gt;
      &lt;elements&gt;
          &lt;element src="aaaa" /&gt;
          &lt;element src="a" /&gt;
          &lt;element src="aaa" /&gt;
      &lt;/elements&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>What I'd like to do is :</p>
  
  <ol>
  <li>Find src element's value.</li>
  <li>Convert src's value to character number by using Convert(string value) method.</li>
  </ol>
  
  <p>ex. aaaa => 4, a => 1, aaa => 3</p>
  
  <ol>
  <li>Replace src's value.</li>
  </ol>
  
  <p>Result:</p>
  
  <pre><code>&lt;root&gt;
      &lt;elements&gt;
          &lt;element src="4" /&gt;
          &lt;element src="1" /&gt;
          &lt;element src="3" /&gt;
      &lt;/elements&gt;
  &lt;/root&gt; 
  </code></pre>