views:

24

answers:

1

Hiya. 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!

+1  A: 

Have you tried a solution such as http://refactormycode.com/codes/708-innerhtml-of-a-domelement ?

meder
that's exactly what i was looking for, thanks!
ufk