Poniżej przedstawiam dane pliku xml po wykonaniu funkcji print_r
SimpleXMLElement Object ( [@attributes] => Array ( [globalSearch] => 1 [lang] => en_gb [requestUrl] => character-sheet.xml ) [tabInfo] => SimpleXMLElement Object ( [@attributes] => Array ( [subTab] => profile [tab] => character [tabGroup] => character [tabUrl] => r=Serwerej&cn=Nick&gn=Heroes ) ) [characterInfo] => SimpleXMLElement Object ( [character] => SimpleXMLElement Object ( [@attributes] => Array ( [battleGroup] => Theatre of Dreams [charUrl] => r=Serwerej&cn=Nick&gn=Heroes [class] => Druid [classId] => 11 [classUrl] => c=Druid [faction] => [factionId] => 1 [gender] => [genderId] => 0 [guildName] => Heroes [guildUrl] => r=Serwerej&gn=Heroes [lastModified] => [level] => 80 [name] => Nick [points] => 355 [prefix] => [race] => Tauren [raceId] => 6 [realm] => Serwerej [suffix] => [titleId] => ) [modelBasePath] => SimpleXMLElement Object ( [@attributes] => Array ( [value] => http://eu.media.battle.net.edgesuite.net/ ) ) ) ) )
W jaki sposób mam wyświetlić nick, bo próbowałem tak tj. echo $xml->characterInfo->character->@attributes->name;
Lecz to na pewno było źle.. Pomoże ktoś? Z góry dziękuję!