With xpath I want to get the value of the href attribute below, but I need to make sure that the url is inside the li tag.
<li class="event">
<span class="mediaCoverageCont">
</span>
<a href="/esportes-futebol/liga-europa-201718-qualificação/1-102-1250545.html" class="24/08/2017 16:45:00">
<span class="imgOuter"><img alt="Dínamo Kiev x Maritimo" src="https://headlines-teams.s3.amazonaws.com/dinamo-de-kiev.png"/></span><spanclass="imgOuter" id="imgOuterRight"><img alt="Dínamo Kiev x Maritimo" src="https://headlines-teams.s3.amazonaws.com/maritimo.png"/></span><spanclass="currentTitle"><h3>Dínamo Kiev x Maritimo</h3></span>
<span class="currentDate"><img src="/s/images/headlines/currentDate.png" border="0" style="margin-right:3px;" align="center"/>24/08/2017 16:45:00</span>
</a>
I'm using this code, nothing else is returned, does anyone know how I can solve this problem?
Part of the code I'm using:
$link = $xpath->query('//li[@class="event" ]/a[@*]')->item(0);