Re: DOM saveHTML() not outputting XHTML Strict

From: Date: Mon, 23 Jan 2006 21:23:20 +0000
Subject: Re: DOM saveHTML() not outputting XHTML Strict
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-229129@lists.php.net to get a copy of this message
I don't know much about the ->saveXML() method but after reading the PHP manual why can't you just do something like this: $xhtml = $dom->saveXML(); // strip out the <?xml and ?> $html = str_replace("<?xml", "", $html); $html = str_replace("?>", "", $html); Would that even work? On 1/23/06 2:52 PM, "Chris" <listschris@leftbrained.org> wrote: > Steve Clay wrote: > >> Monday, January 23, 2006, 1:35:13 PM, Chris wrote: >> >> >>> the ->saveHTML() method ... outputs as <option >>> selected> >>> I need my output HTML to conform to XHTML strict. >>> >>> >> >> Since XHTML is XML, try ->saveXML()? >> >> Steve >> >> > I've tried that, and it suits my purposes except for the fact that it > always outputs the <?xml ?> tag in the front, which I can't have.

« previous php.general (#229129) next »