I am building up a script using XML DOM and PHP\[code\]$troops = $xmlfile->getElementsByTagName("troops");foreach( $troops as $troop ) { $sniper = $troop->getElementsByTagName( "sniper" ); $otroop[0] = $sniper->item(0)->nodeValue; $riffle = $troop->getElementsByTagName( "riffle" ); $otroop[1] = $riffle->item(0)->nodeValue; $riffle = $troop->getElementsByTagName( "shooter" ); $otroop[2] = $riffle->item(0)->nodeValue; $riffle = $troop->getElementsByTagName( "missle" ); $otroop[3] = $riffle->item(0)->nodeValue; $tank = $troop->getElementsByTagName( "tank" ); $otroop[4] = $tank->item(0)->nodeValue; $bomber = $troop->getElementsByTagName( "bomber" ); $otroop[5] = $bomber->item(0)->nodeValue; $patrol = $troop->getElementsByTagName( "patrol" ); $otroop[6] = $patrol->item(0)->nodeValue; $surveillance = $troop->getElementsByTagName( "surveillance" ); $otroop[7] = $surveillance->item(0)->nodeValue;}\[/code\]XML\[code\]<troops> <sniper level="5">2</sniper> <riffle level="0">0</riffle> <shooter level="0">0</shooter> <missle level="0">0</missle> <tank level="0">0</tank> <bomber level="0">0</bomber> <patrol level="0">0</patrol> <surveillance level="0">0</surveillance></troops>\[/code\]I wanna be able to pull the level for each node as well i had tried\[code\]$oresearch[0] = $sniper->getAttribute("level");\[/code\]but that doesn't work, any advice here would be helpful