Loading XML, possible malformed name space or am doing it wrong?
<p>I am having problems loading an XML feed with a php script. I make a copy of the feed on my website and load that so I know what I am debugging. Every single entry in the file has a name space(there are several different ones.)</p>

<p>This is my first time messing with name spaces and I am not able to even get the file to load. When I try</p>

<p><code>$xml = new SimpleXMLElement($result) or die("Error: Cannot create object\n&lt;hr&gt;".$result);</code></p>

<p>It fires the error. That has worked for a dozen different feeds that do not have name spaces(or at least I have not noticed any name spaces). I have tried various ways to get more info on why it can not create the simpleXMLElement and so far none of them return a problem. </p>

<p>I have valided the xml feed with 4 different online validaters. 3 appear to use javascript and say that the feed is perfect, the 4th <a href="http://www.xmlvalidation.com/" rel="nofollow">http://www.xmlvalidation.com/</a> uploads the code to its site and returns saying there was a error with their site.(With other xml their validator works just fine.)</p>

<p>I think I have narrowed the problem down to the Name space stuff. If I remove the name space stuff at the top I can load the xml file with the above code, and then I get a mess of name space errors. Below you can see the namespace info. </p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
&lt;ns1:timeSeriesResponse xsi:schemaLocation="http://www.cuahsi.org/waterML/1.1/ http://waterservices.usgs.gov/WaterML-1.1.xsd" xmlns:ns1="http://www.cuahsi.org/waterML/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
&lt;ns1:queryInfo xmlns:ns2="http://www.cuahsi.org/waterML/1.1/"&gt;
</code></pre>

<p>Link to a sample xml page <a href="http://waterservices.usgs.gov/nwis/iv/?format=waterml,1.1&amp;sites=06306300&amp;parameterCd=00060,00065" rel="nofollow">http://waterservices.usgs.gov/nwis/iv/?format=waterml,1.1&amp;sites=06306300&amp;parameterCd=00060,00065</a></p>