I am using the Simple HTML DOM Parser and I want to completely ignore the contents of the "nested" element and get the contents of the proceeding "pre" element.
<div id=parent>
<div class="nested">
<pre>Text that I want ignored</pre>
</div>
<pre>
This is the text I want to access
</pre>
</div>
I don't have control of the HTML source, and the owner has recently added the "nested" element. Before I accessed the content I needed by doing so:
$page_contents = file_get_html($url);
$div_content = $page_contents->find('div[id=parent]pre', 0)->innertext;
But obviously the new nested element has broken my method.
I can't seem to find any official documentation regarding this kind of scenario.