我将具有以下XML结构:
<entry>
<id im:id="595831580">blabla</id>
</entry>
Run Code Online (Sandbox Code Playgroud)
现在,我想解析ID 595831580。
我试过了:
$idAtt = $xml->entry->id;
$id = $idAtt->attributes();
$id2 = $id['im:id'];
Run Code Online (Sandbox Code Playgroud)
但这不起作用:(
我该如何解决?