Re: [PHP] How about a saveXHTML for the DOM?

2009-04-11 Thread Raymond Irving
wrote: From: Michael A. Peters mpet...@mac.com Subject: Re: [PHP] How about a saveXHTML for the DOM? To: Raymond Irving xwis...@yahoo.com Cc: php-general@lists.php.net php-general@lists.php.net Date: Friday, April 10, 2009, 6:35 PM Raymond Irving wrote: Thanks for the feedback Michael

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-11 Thread Michael A. Peters
Raymond Irving wrote: 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.

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-11 Thread Michael A. Peters
Michael A. Peters wrote: With respect to templating systems, I don't use them but if you have a DOMDocument orientated template system, I don't see why it couldn't do the same thing - As an experiment, I took one of my pages that was a little sluggish due to lots of database calls

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-10 Thread Raymond Irving
--- On Wed, 4/8/09, Michael A. Peters mpet...@mac.com wrote: From: Michael A. Peters mpet...@mac.com Subject: Re: [PHP] How about a saveXHTML for the DOM? saveXML() already does what is needed to provide valid xhtml output. From my test it sometimes generate this like #13; at the end

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-10 Thread Michael A. Peters
Raymond Irving wrote: --- On Wed, 4/8/09, Michael A. Peters mpet...@mac.com wrote: From: Michael A. Peters mpet...@mac.com Subject: Re: [PHP] How about a saveXHTML for the DOM? saveXML() already does what is needed to provide valid xhtml output. From my test it sometimes generate

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-10 Thread Michael A. Peters
Michael A. Peters wrote: $myxhtml-loadXML($xmlstring); $elements = $myxhtml-getElementsByTagName(html); $xmlHtml = $elements-item(0); ? forgot this tidbit - ?pjp if ($usexml == 1) { $xmlHtml-setAttribute(xmlns,http://www.w3.org/1999/xhtml;);

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-10 Thread Raymond Irving
/10/09, Michael A. Peters mpet...@mac.com wrote: From: Michael A. Peters mpet...@mac.com Subject: Re: [PHP] How about a saveXHTML for the DOM? To: Raymond Irving xwis...@yahoo.com Cc: php-general@lists.php.net php-general@lists.php.net Date: Friday, April 10, 2009, 3:57 PM Raymond Irving wrote

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-10 Thread Michael A. Peters
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 #13; to the end of the tags? This is normally the case if the html content was loaded using loadHTMLFile() I think

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-09 Thread Michael A. Peters
Michael Shadle wrote: On Wed, Apr 8, 2009 at 8:58 PM, Michael A. Peters mpet...@mac.com wrote: Yes it should - I believe php 6 is suppose to be much better at native UTF8. At least according to some blog I read somewhere (IE don't believe me without reservation, it's third hand knowledge at

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-09 Thread Michael Shadle
On Thu, Apr 9, 2009 at 12:25 AM, Michael A. Peters mpet...@mac.com wrote: I did a little reading on the issue and I don't think php 6 will fix it. The issue is with libxml2 - it mutilates utf8 when exporting to html and php function wraps the libxml2 function. The solution? I don't know -

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-09 Thread Michael Shadle
On Thu, Apr 9, 2009 at 12:25 AM, Michael A. Peters mpet...@mac.com wrote: I did a little reading on the issue and I don't think php 6 will fix it. The issue is with libxml2 - it mutilates utf8 when exporting to html and php function wraps the libxml2 function. not to mention i swore i tried

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-09 Thread Benjamin Hawkes-Lewis
On 9/4/09 04:55, Michael A. Peters wrote: IE (still) does not properly support XHTML. It will render an XHTML page sent with the text/html mime type - but that's actually a standards violation. Is it? What standard is it violating? XHTML Documents which follow the guidelines set forth in

[PHP] How about a saveXHTML for the DOM?

2009-04-08 Thread Raymond Irving
Hello, I'm thinking that it's about time a saveXHTML() method be added to the DOM objects. XHTML is supported by all major browsers and libxml2 so I can't see why we should be stuck with saveHTML() and saveXML(). While it's true that some developers are using saveXML(), it does not always

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-08 Thread Michael Shadle
i think it should also be fully utf-8 capable. saveHTML is not for me right now, and i have to run some preg_replace to remove the html etc chunks, and the output is not utf-8, even though the input is. i got a workaround using html_decode_entities() or something like that but i haven't ran it to

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-08 Thread Michael A. Peters
Raymond Irving wrote: Hello, I'm thinking that it's about time a saveXHTML() method be added to the DOM objects. Not necessary. saveXML() already does what is needed to provide valid xhtml output. See the php source of http://www.clfsrpm.net/xss/dom_script_test.phps to see how one can

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-08 Thread Michael A. Peters
Michael Shadle wrote: i think it should also be fully utf-8 capable. saveHTML is not for me right now, and i have to run some preg_replace to remove the html etc chunks, and the output is not utf-8, even though the input is. i got a workaround using html_decode_entities() or something like that

Re: [PHP] How about a saveXHTML for the DOM?

2009-04-08 Thread Michael Shadle
On Wed, Apr 8, 2009 at 8:58 PM, Michael A. Peters mpet...@mac.com wrote: Yes it should - I believe php 6 is suppose to be much better at native UTF8. At least according to some blog I read somewhere (IE don't believe me without reservation, it's third hand knowledge at best) afaik you're