<a href="/repetitor.aspx?id=4350" class="teacher-name"> Полина Игоревна</a>
require_once($_SERVER["DOCUMENT_ROOT"] . "/parser/simple_html_dom.php");
$sitemap = "http://example.ru/sitemap.xml";
$xmlstring = file_get_contents($sitemap);
$xml = simplexml_load_string($xmlstring);
$json = json_encode($xml);
$array = json_decode($json,TRUE);
foreach($array['url'] as $link) {
$url = $link['loc'];
$html = file_get_contents($url);
$data = str_get_html($html);
$teacherArray = $data->find('.teacer-name'); //тут массив ссылок
if(count($teacherArray)) {
foreach($teacherArray as $a){
echo $a->href;
echo $a->plaintext;
}
}
}