$dom=new DOMDocument(1.0);
$dom->load(data.xml);
$items=$dom->getElementsByTagName(video);
echo $items-> item(0)->getattribute("img");
foreach($items as $a){
foreach($a->attributesas$b){
echo $b->nodeName;
echo ":";
echo $b->nodeValue;
echo "
";
}
echo "--------------------
";
}
?>
data.xml