1
<?xml version="1.0"?>
<items version="1.5">
<item name="device">iphone</item>
<item name="affinity">testing</item>
</items>
我需要从设备和亲和力值“iPhone”和值“测试”,我该如何选择呢?
我已经试过:
$xml = new DOMDocument();
$xml->loadXML($request);
$itemList = $xml->getElementsByTagName('item');
foreach($itemList as $install)
{
echo $install->getAttribute('device')->item(0)->nodeValue;
}
但是,这似乎并没有工作。
谢谢!
的伟大工程谢谢:d – Titan 2011-05-06 14:27:44