Simple XML Namespace Alert

I am trying to parse the following XML using simplexml ...

http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/xml/500?key=ed47ad61-5033-48c8-bf7c-6c4c0b17c3f3

but as soon as I add the line ...

$xml = simplexml_load_file('http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/xml/500?key=ed47ad61-5033-48c8-bf7c-6c4c0b17c3f3');

I get and error for example

namespace warning : xmlns: URI www.metoffice.gov.uk/xml/metoRegionalFcst is not absolute

I can’t figure out how to get around this problem.

+4
source share
2 answers
+6
source
libxml_use_internal_errors(true);
$xml = simplexml_load_file($file->getTempName());


us3.php.net/manual/es/function.simplexml-load-file.php
us3.php.net/manual/es/function.libxml-use-internal-errors.php
us3.php.net/manual/es/simplexml.examples-errors.php
0
source

All Articles