tags:

views:

34

answers:

1

Possible Duplicate:
xPath doesn't retrieve HTML as part of the content

I parse a web page with the help of xPath and retrieving the content of the div element, it omits HTML that is contained in that div element. How to make it retrieve the whole content of the div element with HTML included?

A: 

If this were in Javascript, I'd just say use the .innerHTML attribute, which would retrieve all the entirety of the contents of any given node. But since you're on PHP, there's no such function.

You can fake it, however, as detailed here: http://www.dynamit.us/blog/2009/03/php-dom-innerhtml-method/

Marc B