title: XML Changing value of namespace property
body: <p>I need to change a value of a nested namespace property within a XML document before I submit it to an EPP service.</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
   &lt;epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd"&gt;
     &lt;command&gt;
       &lt;info&gt;
         &lt;host:info xmlns:host="urn:ietf:params:xml:ns:host-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd"&gt;
           &lt;host:name&gt;ns1.example.test.example.com&lt;/host:name&gt;
         &lt;/host:info&gt;
       &lt;/info&gt;
       &lt;clTRID&gt;NORID-14373-1207137695427775&lt;/clTRID&gt;
     &lt;/command&gt;
   &lt;/epp&gt;
  </code></pre>
  
  <p>In the above XML, I need to change the host:name elements value. I am using PHP simplexml_load_string to first modify the values from the XML schema as shown below.</p>
  
  <pre><code> $xml = simplexml_load_string(file_get_contents($fn));
   $xml-&gt;command-&gt;clTRID = GUID(); // This works perfectly
   $xml-&gt;command-&gt;info-&gt;name = 'somename'; // Does not work :)
  </code></pre>
  
  <p>What is the correct way to do this?</p>