Use the DOM navigation. Navigation begins with the body , or any other element.
DOM elements have the properties firstElementChild (the first child) and lastElementChild (the last child). After you have decided which root tag you have, and received its first element, you can move along its child tags forward ( nextElementSibling ) and backward ( previousElementSibling ).
Here is an example for clarity. There are many div 's in it and they all look the same (no id or class ), but only one contains the word we need (win):
var root=document.getElementById("root"); var winNode=root.firstElementChild.firstElementChild.nextElementSibling.firstElementChild.nextElementSibling; alert(winNode.textContent);
<div id="root"> <div> <div>fail</div> <div> <div>fail</div> <div>win</div> </div> </div> </div>
количество a, p и div множество- Vlad<p>because searching forfind('p',0)breaks out and thinks that this isaI just corrected it for the idea should help$html->find('a',0)->next()although it is not clear what he wants - Naumov