I try to extract the word "Headline2" with XPath from a nested "div" container. The problem is that there are no explicit class names to use as an identifier.
Therefore I've tried to select the 4th div like that- without a certain class identifier, but I don't get a result.
$xpath->query('//div[contains(@id, "EU-group-keep")]//div//div//div//div');
What is the correct way to extract the 4th div container without the use of a certain class identifier?
<div class="tiw-group" id="EU-group-keep" data-type="multi-line">
<div class="tiw-group-ending"></div>
<div class="tiw-group-quantity"></div>
<div class="tiw-group-name"><a href="test">[Headline1]</a></div>
<div class="tiw-line-ending">Headline2</div>
<div class="tiw-line-quantity"></div>
<div class="tiw-line-name" id="group-keep-line-0"><span></span></div>
</div>
</div>