I'm trying to keep certain parts of HTML elements inside a dom that was loaded by DomDocument and CURL.
Problem is that when I do xpath query and retireve nodeValue it omits the HTML elements.
Below is the code. Is there a way to retrieve HTML for that particular node?
$location = $xpath->query("//div[@id='location']/label");
echo $location->item(0)->nodeValue."<br>";