Re: DOM saveHTML() not outputting XHTML Strict
| From: | Jay Paulson | Date: | Mon, 23 Jan 2006 21:26:57 +0000 |
| Subject: | Re: DOM saveHTML() not outputting XHTML Strict | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-229130@lists.php.net to get a copy of this message | ||
ACK! Of course I put errors in the code. But I just read if you want to
strip out the first line that would be easy. Just use a regular expression
and take it out. :)
On 1/23/06 3:23 PM, "Jay Paulson" <Jay.Paulson@wholefoods.com> wrote:
> 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.