[SimpleXML] Analyse d'un fichier XML
Bonjour,
Je souhaiterais parser le fichier xml suivant pour pouvoir traiter les info qu'il contient : http://xml.pinnaclesports.com/pinnacleFeed.asp
J'execute donc dans mon script php :
Code:
$xml = new SimpleXMLElement("http://xml.pinnaclesports.com/pinnacleFeed.asp");
Mais à l'execution j'obtient le message suivant :
Code:
1 2 3 4 5 6 7 8
|
Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : Start tag expected, '<' not found in D:\EasyPHP 3.0\www\parser.php on line 5
Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: http://xml.pinnaclesports.com/pinnacleFeed.asp in D:\EasyPHP 3.0\www\parser.php on line 5
Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: ^ in D:\EasyPHP 3.0\www\parser.php on line 5
Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in D:\EasyPHP 3.0\www\parser.php:5 Stack trace: #0 D:\EasyPHP 3.0\www\parser.php(5): SimpleXMLElement->__construct('http://xml.pinn...') #1 {main} thrown in D:\EasyPHP 3.0\www\parser.php on line 5 |
Comment faire pour parser ce fichier ?
Par avance merci beaucoup !