我正在尝试从每个 xml 和 php 这样的孩子中过滤出一个元素
xml=
-<game>
<gameName>ValveTestApp202990</gameName>
<gameVersion>7</gameVersion>
-<availableGameStats>
-<achievements>
-<achievement>
<name>MP_MISC_1</name>
<defaultvalue>0</defaultvalue>
<displayName>Willkommen im Club</displayName>
<hidden>0</hidden>
</achievement>
-<achievement>
<name>MP_MISC_2</name>
<defaultvalue>0</defaultvalue>
<displayName>Willkommen im Penthouse</displayName>
<hidden>0</hidden>
</achievement>
</achievements>
</availableGameStats>
</game>
php=
$url11=
'http://api.steampowered.com/ISteamUserStats/GetPlayerAchievements/v0001/?appid='
. $dasgame . '&key=' . $steam_api . '&steamid=' . $username .
'&l=german&format=xml'; $data11 = file_get_contents($url11); $xml11
= simplexml_load_string($data11);
$joke ="MP_MISC_2";
if ( $xml11->availableGameStats->achievements->achievement->name !=
$joke ) continue;
知道anoyne我如何搜索元素中的字符串吗?
提前谢谢,对不起,我只是一个初学者