title: Save XML from SimpleXMLElement failed to open stream error
body: <p>The XML file and the folder on the server where the file is kept are world read write in a Windows Vista, IIS 7 environment. Calling the asXML function returns this warning and the file isn't updated.</p>
  
  <pre><code>Warning: SimpleXMLElement::asXML(communities.xml) simpleelement.asxml failed to open stream: permission denied in c:\path\make_update.php.
  </code></pre>
  
  <p>The file make_update.php updates nodes in the XML.</p>
  
  <pre><code>&lt;?php
  
  ini_set('display_errors', 1);
  error_reporting(E_ALL);
  
  function make_update( $nodeid, $name, $top, $left, $width, $height ) {
  
  $nodes = new SimpleXMLElement('communities.xml', null, true);
  
  $returnArray = $nodes-&gt;xpath("//COMMUNITY[@ID='$nodeid']");  
  $node = $returnArray[0]; 
  $node-&gt;TOP = $top;
  
  $nodes-&gt;asXML('communities.xml');
  
  return $node-&gt;TOP;
  }
  
  echo make_update(trim($_REQUEST['nodeid']),trim($_REQUEST['name']),trim($_REQUEST['top']),trim($_REQUEST['left']),trim($_REQUEST['width']),trim($_REQUEST['height']));
  
  ?&gt;
  </code></pre>