PHP XML Parse from website URL

橙三吉。 提交于 2019-12-11 18:44:17

问题


I've got a XML file on the net which I'm trying to split up into variables and display to the user.

This is the url to the file: http://www.labs.skanetrafiken.se/v2.2/querypage.asp?inpPointFr=lund&inpPointTo=ystad

This now seems VERY easy to do from what I've read but the only thing I've gotten to work is this.

$xml = new SimpleXMLElement($url, null, true);
echo $xml->asXML(); // this spits out a huuuge string.

Nothing else has worked. Not simplexml_load_string() or any of the other things.

I've read about 20-40 tutorials and none have worked, getting abit frustrated so to speak.

来源:https://stackoverflow.com/questions/11847124/php-xml-parse-from-website-url

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!