I am trying to parse on <span role="heading" using:
foreach($html->find("span[role=heading]") as $role) {
echo 'Inner' . $role->innertext . '<br>' . PHP_EOL;
What am I missing?
I can perform typical parses, such as:
foreach($html->find('ul.Experiences') as $ul) {
foreach($ul->find('li.experience') as $li)
echo $li->innertext . '<br>' . PHP_EOL;
Your code looks fine to me. I can't seem to reproduce your issue.
Which version do you use?
Can you share a document that consistently fails for you?
Here is my test script for reference (tested with 1.9):