title: XML - Select xmlNode depending on innertext
body: <p>I have a 'xmlDocument'-Object, 
  which contains this structure:</p>
  
  <pre><code>&lt;Projects&gt;
    &lt;Project&gt;
      &lt;Name&gt;Value1&lt;/Name&gt;
    &lt;/Project&gt;
    &lt;Project&gt;
      &lt;Name&gt;Value2&lt;/Name&gt;
    &lt;/Project&gt;
  &lt;/Projects&gt;
  </code></pre>
  
  <p>I need to change these values on runtime via c#.
  My thought was</p>
  
  <ul>
  <li>create new 'xmlnode'-Object</li>
  <li>Change its innertext</li>
  <li>save the document</li>
  </ul>
  
  <p>But I don't know how to select the xml-node depending on its innertext.
  I researched a bit, and tried that:</p>
  
  <pre><code>XmlNode nameNode = doc.SelectSingleNode("Projects\\Project\\Name[text()='" + projectName + "']");
  </code></pre>
  
  <p>which causes 'XPathException'.</p>
  
  <p>How do you write the path on the right way?</p>