Question

I'm using the simple HTML DOM parser for my own template system and found a problem.

Here's my markup:

<div class=content>
    <div class=navigation></div>
</div>

I'm replacing the div.navigation with own content like:

$navi= $dom->find("div.navigation",0);
$navi->outertext = "<a class=aNavi>click me!</a>";

works nicely - i can echo it but the problem is - before echoing i still want to access/manipulate that link with the parser, but the parser won't find it.

$link = $dom->find("a.aNavi");

will return null :(

Seems like the parser needs to be refreshed/updated after changing the outertext - any ideas if it's possible?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top