title: Empty xml object when using SimpleXML - Node no longer exists
body: <p>The xml is as follows:</p>
  
  <pre><code>&lt;root&gt;
     &lt;organizations&gt;
          &lt;organization&gt;
            &lt;info&gt;
              &lt;orgID&gt;1234&lt;/orgID&gt;
              &lt;orgName&gt;XYZ Company&lt;/orgName&gt;
              &lt;address&gt;
                  &lt;address1&gt;1 Main Street&lt;/address1&gt;
                  &lt;city&gt;Somewhere&lt;/city&gt;
                  &lt;state&gt;MI&lt;/state&gt;
                  &lt;zip&gt;12334&lt;/zip&gt;
              &lt;/address&gt;
            &lt;/info&gt;
           &lt;/organization&gt; 
        &lt;/organizations&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>The code is as follows:</p>
  
  <pre><code>$ind = strpos($xmlResponse, "&lt;");
  $xml = simplexml_load_string(substr($xmlResponse, $ind));
  //echo $xml;
  $orgList = $xml-&gt;organizations-&gt;children();
  
  foreach($orgList as $orgList)
  {
      echo $orgList-&gt;orgName;
  }
  </code></pre>
  
  <p>And I get the following error:</p>
  
  <p><code>Warning: main() [function.main]: Node no longer exists in...</code></p>
  
  <p>The offending line is 
      <code>foreach($orgList as $orgList)</code></p>
  
  <p>Can anyone tell me what I'm doing wrong? I've tried accessing the xml through 50 different ways and either get that error or an empty xml object.</p>
  
  <p>Thanks in advance!</p>