Home > Backend Development > PHP Tutorial > php循环处理xml

php循环处理xml

WBOY
Release: 2016-06-23 14:39:08
Original
993 people have browsed it




乘坐10路,经过4站,到达熟食品交易中心站


步行90米,到达终点站






步行460米,到达解放广场站




php怎么循环处理info


回复讨论(解决方案)

处理文件:
simplexml_load_file('/xml');
处理字符串:
simplexml_load_string($xmlstr);

此函数将返回一个类型为SimpleXMLElement的对象,此处定义处理后的变量名为$xml。
返回结点内容:$xml->elementName
返回结点属性内容:$xml->elementName['attribName']

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template