Re: How about a saveXHTML for the DOM?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




If I remove the \r from the file using preg_replace() then it shows up just fine. I was just wondering if there was a way to suppress the \r in the xml output.

Another thing that I've observed while looking at your code is that it only works best for dynamic web pages. It appears that it would not work well when using page caching or page templates.

I really think having a function that generates xhtml (html compatible) output, would really eliminate all these workarounds that we will have to do in order to get the page to render inside popular web browsers.

A lot of developers produce xhtml web pages that are html 4 compatible, so that they can be rendered in browsers that only supports html rendering. This is something that I think the PHP DOM should be able to support with ease.



Best regards,
__
Raymond Irving



--- On Fri, 4/10/09, Michael A. Peters <mpeters@xxxxxxx> wrote:

> From: Michael A. Peters <mpeters@xxxxxxx>
> Subject: Re:  How about a saveXHTML for the DOM?
> To: "Raymond Irving" <xwisdom@xxxxxxxxx>
> Cc: "php-general@xxxxxxxxxxxxx" <php-general@xxxxxxxxxxxxx>
> Date: Friday, April 10, 2009, 6:35 PM
> Raymond Irving wrote:
> > 
> > Thanks for the feedback Michael. I will look into your
> suggesstions.
> > 
> > Is there an option on the DOMDocument that we can set
> to not have saveXML() append 
 to the end of the tags?
> > 
> > This is normally the case if the html content was
> loaded using loadHTMLFile()
> 
> I think I've seen that appear in textarea as well - I
> believe it has to do with the libebreaks of the application
> that created the file (or in case of textarea from a form,
> the line break convention of the browser).
> 
> Does it happen when you run
> 
> sed -i 's/\r//g' file.html
> 
> to remove the DOS carriage return from the line breaks?
> 
> That would be my guess.
> 
> -- PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux