<?php $xml = <<<XML <xml> <a href="site.com/3572">bla-bla-bla1</a> <a href="site.com/asfsagf">bla-bla-bla2</a> <a href="site.com/347548">bla-bla-bla3</a> </xml> XML; $dom = new DOMDocument; $dom->loadXML($xml); $xpath = new DOMXPath($dom); foreach ($xpath->query('//a/@href') as $href) { echo $href->nodeValue, PHP_EOL; }
You have javascript disabled. You will not be able to edit any code.