0

I'm using DomDocument to query for html elements. when i use $obj->textContent or $obj->nodeValue it returns only the texts that include in the element, it does not return the html representation of the object.

which means.. if the object contains

<div>test</div>

the return value for both tries will be test.

how do i fetch the html elements as well?

I know that there are other solutions for this besides domDocument like DomHTMlDocument and others but i'd prefer to work a solution with DomDocument.

thanks!

4

1 回答 1

1

您是否尝试过诸如http://refactormycode.com/codes/708-innerhtml-of-a-domelement之类的解决方案?

于 2010-07-10T20:12:49.120 回答