$carArray = simplexml_load_file("carr.xml") or die("failed");
foreach($carArray->children() as $c){
$year = $c->ModelYear;
$price = $c->PricePerDay;
$brand = $c->Brand;
$model=$c->Model;
}
ModelYear等是xml的标签,根据标签遍历xml文件获得数据