title: Editing XML Nodes through SimpleXML PHP
body: <p>I know similar questions have been asked several times, but I can't find a solution to the following:</p>
  
  <p>I've got a simple XML file:
  servers.xml</p>
  
  <pre><code>&lt;servers&gt;
  
      &lt;server&gt;
          &lt;name&gt; Google &lt;/name&gt;
          &lt;address&gt;http://www.google.com&lt;/address&gt;
      &lt;/server&gt;
  
      &lt;server&gt; 
          &lt;name&gt; Yahoo &lt;/name&gt;
          &lt;address&gt;http://www.yahoo.com&lt;/address&gt;
      &lt;/server&gt;
  
      &lt;server&gt;
          &lt;name&gt; Bing &lt;/name&gt;
          &lt;address&gt;http://www.bing.com&lt;/address&gt;
      &lt;/server&gt;
  
  &lt;/servers&gt;
  </code></pre>
  
  <p>Now, I'm trying to get the <code>&lt;server&gt;</code> node which has a name of "Google" for example, and then change the address tag.
  I have no idea how to go about it using SimpleXML.
  So an example scenario would the following:</p>
  
  <ol>
  <li>Get the server object/array where $serverName = "Google"</li>
  <li>Edit the server's address field to something  different like <a href="http://www.google.co.uk" rel="nofollow">http://www.google.co.uk</a></li>
  <li>Write the changes back to the XML file.</li>
  </ol>
  
  <p>Any help would be appreciated. </p>