$con=file_get_contents("http://vol.stock.hexun.com/charts/Close/Share/Info_3.ashx?code=600111"); $xml = simplexml_load_string($con); foreach($xml->Item as $v){ $arr=(array)$v->attributes(); $ar[]=$arr['@attributes']; }