【发布时间】:2014-08-03 03:50:40
【问题描述】:
(没关系,我已经找到了解决方案)
我知道如何解析 XML 文件,但这是我第一次遇到带有内联值的东西
<?xml version="1.0" encoding="iso-8859-1"?>
<imginfo xmlns="http://ns.xxxxxxxx.com/12/" version="8" timestamp="1406951709">
<files server="540" rownumber="8376">
<image size="177" content-type="image/jpeg">sample_name_here.jpg</image>
</files>
<resolution>
<width>800</width>
<height>486</height>
</resolution>
</imginfo>
如何提取server 的值,在这种情况下该值为540(使用PHP 的SimpleXMLElement)
【问题讨论】:
标签: php xml dom xml-parsing attributes