voku / simple_html_dom

📜 Modern Simple HTML DOM Parser for PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

set inner text not working

CnczubehoerEu opened this issue · comments

What is this feature about (expected vs actual behaviour)?

I would like to fill an empty tag with text.

I tried the following:

                        echo $techSpecItem->innertext;

                        $techSpecItem->find(".hero_techSpecItemName", 0)->innerText = "bla";
                        $techSpecItem->find(".hero_techSpecItemValue", 0)->innerText = "blubb";

                        echo $techSpecItem->innertext;

The first echo is right. The second one is exactly the same.

How can I reproduce it?

Does it take minutes, hours or days to fix?

Any additional information?

I figured out, that when I'm able to find the element hero_techSpecItemName / hero_techSpecItemValue directly from the outer DOM object (in my case "$document"), it is working with "->innertext":

                        $document->find(".hero_techSpecItemName", 0)->innertext = "bla";
                        $document->find(".hero_techSpecItemValue", 0)->innertext = "blubb";