Re: DOM Question. No pun intended.

From: Date: Thu, 14 Sep 2006 16:51:16 +0000
Subject: Re: DOM Question. No pun intended.
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-241789@lists.php.net to get a copy of this message
Rob, I wasn't aware that that would work. I mean I suppose it should, but basically this is what I'm doing: 1) Create a new DOMDocument 2) DOMDocument->loadHTML() 3) find the elements I want with getElementsByTag() then finding the one with the correct attributes . . .at this point, I need the equivalent of DOMDocument->saveHTML() so that it outputs the *exact* html content. Are you saying that saveXML() will do what I want it to do; tags and all? Regards, Mike Quoting Rob <rrichards@ctindustries.net>:
mwilliams@infinitydatasystems.com wrote:
Satyam, I don't see any "innerHTML" or "outerHTML" in relation to PHP DOM. I'm familiar with them from a Javascript standpoint, but no references when it comes to PHP DOM. Regards, Mike
Now that you have the element, why not just call: $doc->saveXML($node); Rob


« previous php.general (#241789) next »