Re: DOMXML Warning
| From: | Nathan Rixham | Date: | Wed, 13 Feb 2008 14:22:46 +0000 |
| Subject: | Re: DOMXML Warning | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-269245@lists.php.net to get a copy of this message | ||
Miguel J. Jiménez wrote:
Hi, after enabling error reporting with E_ALL I am having this strange warning while loading a XML: Warning: DOMDocument::load() [function.DOMDocument-load]: Extra content at the end of the document in [...] The code I use is: $dom = new DOMDocument(); $dom->load("http://example.com/file.xml"); [...] If I open the xml uri (with firefox) I get a complete and well formed xml (nothing strange about it). With error reporting disabled everything works fine so I am puzzled :-( Any help will be appreciated. --- .---------------------------------------------------------.check raw the file output by doing: print_r(file_get_contents("http://example.com/file.xml")); that should show you exactly what's causing the error. another possibility is that the site has bot protection on there and is redirecting your request to a standard web page. Alternatively pass the url to the XML file to me and I'll investigate for you. Nathan| Miguel J. Jiménez | | Sector Público, ISOTROL S.A. | | mjjimenez@isotrol.com |:---------------------------------------------------------:| KeyID 0xFFE63EC6 hkp://pgp.rediris.es:11371 |:---------------------------------------------------------:| Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta. | | Parque Tecnológico Cartuja '93, 41092 Sevilla (ESP). || Tlfn: +34 955 036 800 (ext.1805) - Fax: +34 955 036 849 || http://www.isotrol.com |:---------------------------------------------------------:| UTM ED-50 X:765205.09 Y:4144614.91 Huso: 29 |:---------------------------------------------------------:| "Oh no, Number One. I'm sure most will be much more | | interesting. Let's see what's out there. Engage." | | Capt. Jean-Luc Picard | | Star Trek TNG (1x01, Encounter At Farpoint) |'---------------------------------------------------------'