2

我需要做什么才能从这个 xml 服务接收日期: http ://www.OpenLigaDB.de/Webservices/Sportsdata.asmx?WSDL ?

有谁知道如何从 xml webservice 获取数据的好教程?

谢谢!!

4

1 回答 1

0

做这样的事情:

function xml() {

  // import XML class 
  App::import('Xml'); 

  // your XML file's location or however you want to get it
  $file = "my_xml_file.xml"; 

  // now parse it 
  $parsed_xml =& new XML($file); 
  $parsed_xml = Set::reverse($parsed_xml);

  // see the returned array 
  debug($parsed_xml); 
} 

然后通过多维数组访问它。瞧!

于 2012-09-26T17:55:56.990 回答