- simplexml_load_string: documentation ( source)
<?php
$str=<<<XML
<scales>
<di val="Atlantic">
<t tid="1610612752" ta="NYK" tn="Knicks" tc="New York" see="2" cli="1" elim="0" str="W 1" l10="8-2" dr="10-6" cr="37-15" l="28" w="54" hr="31-10" ar="23-18" gb="12"/>
<t tid="1610612751" ta="BKN" tn="Nets" tc="Brooklyn" see="4" cli="1" elim="0" str="W 2" l10="7-3" dr="11-5" cr="36-16" l="33" w="49" hr="26-15" ar="23-18" gb="17"/>
<t tid="1610612738" ta="BOS" tn="Celtics" tc="Boston" see="7" cli="1" elim="0" str="L 1" l10="4-6" dr="7-9" cr="27-24" l="40" w="41" hr="27-13" ar="14-27" gb="24.5"/>
<t tid="1610612755" ta="PHI" tn="76ers" tc="Philadelphia" see="9" cli="0" elim="1" str="W 1" l10="5-5" dr="7-9" cr="22-30" l="48" w="34" hr="23-18" ar="11-30" gb="32"/>
<t tid="1610612761" ta="TOR" tn="Raptors" tc="Toronto" see="10" cli="0" elim="1" str="W 5" l10="7-3" dr="5-11" cr="22-30" l="48" w="34" hr="21-20" ar="13-28" gb="32"/>
</di>
<di val="Central">
<t tid="1610612754" ta="IND" tn="Pacers" tc="Indiana" see="3" cli="1" elim="0" str="L 3" l10="5-5" dr="13-3" cr="31-20" l="32" w="49" hr="30-11" ar="19-21" gb="16.5"/>
<t tid="1610612741" ta="CHI" tn="Bulls" tc="Chicago" see="5" cli="1" elim="0" str="W 2" l10="5-5" dr="9-7" cr="34-18" l="37" w="45" hr="24-17" ar="21-20" gb="21"/>
<t tid="1610612749" ta="MIL" tn="Bucks" tc="Milwaukee" see="8" cli="1" elim="0" str="W 1" l10="3-7" dr="7-9" cr="24-28" l="44" w="38" hr="21-20" ar="17-24" gb="28"/>
<t tid="1610612765" ta="DET" tn="Pistons" tc="Detroit" see="11" cli="0" elim="1" str="L 1" l10="5-5" dr="8-8" cr="25-27" l="53" w="29" hr="18-23" ar="11-30" gb="37"/>
<t tid="1610612739" ta="CLE" tn="Cavaliers" tc="Cleveland" see="13" cli="0" elim="1" str="L 6" l10="2-8" dr="3-13" cr="18-34" l="58" w="24" hr="14-27" ar="10-31" gb="42"/>
</di>
</scales>
XML;
$xml=simplexml_load_string($str);
foreach($xml->xpath('//di/t[@ta="CHI"]') as $t)
{
echo $t;
}