Ja neviem presne ako, nechce sa mi...Možno nejak takto: http://php.net/manual/en/domdocument.getelementsby tagname.php