xml文件有axis生成的:
我想获得ns1:checkQyReturn当中的内容。
请问如何用php获取?
------解决思路----------------------
可以使用new SimpleXmlElement解决
$x = new SimpleXmlElement($str);
foreach($x->entry as $t){
echo $t->id . "
";
echo $t->updated . "
";
$namespaces = $t->getNameSpaces(true);
$gd = $t->children($namespaces['ns1']);
echo $gd->phoneNumber;
}
参考:http://www.neatstudio.com/show-1549-1.shtml