Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-15 Thread Raymond Irving
Thanks for your feedback. __ Raymond Irving --- On Tue, 4/14/09, Michael A. Peters mpet...@mac.com wrote: From: Michael A. Peters mpet...@mac.com Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: Raymond Irving xwis...@yahoo.com Cc: php-general@lists.php.net

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-15 Thread Raymond Irving
? __ Raymond Irving --- On Tue, 4/14/09, Michael Shadle mike...@gmail.com wrote: From: Michael Shadle mike...@gmail.com Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: Raymond Irving xwis...@yahoo.com Cc: php-general@lists.php.net php-general@lists.php.net Date: Tuesday

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-15 Thread Michael Shadle
...@gmail.com wrote: From: Michael Shadle mike...@gmail.com Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: Raymond Irving xwis...@yahoo.com Cc: php-general@lists.php.net php-general@lists.php.net Date: Tuesday, April 14, 2009, 8:26 PM As michael said my main

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-14 Thread Peter Ford
Michael Shadle wrote: On Mon, Apr 13, 2009 at 2:19 AM, Michael A. Peters mpet...@mac.com wrote: The problem is that validating xhtml does not necessarily render properly in some browsers *cough*IE*cough* I've never had problems and my work is primarily around IE6 / our corporate

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-14 Thread Raymond Irving
advantage of using xhtml in the web browser over html for normal web application development? __ Raymond Irving --- On Tue, 4/14/09, Peter Ford p...@justcroft.com wrote: From: Peter Ford p...@justcroft.com Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: php

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-14 Thread Michael A. Peters
Raymond Irving wrote: Hi, I'm thinking about using the html5 doctype for all html documents since it's supported by all the popular browsers available today. Two Quick questions... Why do we need to send XHTML code to a web browser when standard html code (with html 5 doctype) will do

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-14 Thread Michael Shadle
application development? __ Raymond Irving --- On Tue, 4/14/09, Peter Ford p...@justcroft.com wrote: From: Peter Ford p...@justcroft.com Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: php-general@lists.php.net Date: Tuesday, April 14, 2009, 5:05 AM Michael

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael A. Peters
Raymond Irving wrote: Hello, After talking with Michael about how to generate XHTML code using the DOM I came up with this little function that I'm thinking of using to generate XHTML code that's HTML compatible: function saveXHTML($dom) { $html = $dom-saveXML(null,LIBXML_NOEMPTYTAG);

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael Shadle
On Sun, Apr 12, 2009 at 8:07 AM, Raymond Irving xwis...@yahoo.com wrote:    $html = preg_replace('/\!\[CDATA\[(.*)\]\]\/script/s','//![CDATA[\1//]]/script',$html); question - the output of this would be script type=text/javascript![CDATAjs code ... ]]/script right? is the cdata truly

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael A. Peters
Michael Shadle wrote: On Sun, Apr 12, 2009 at 8:07 AM, Raymond Irving xwis...@yahoo.com wrote: $html = preg_replace('/\!\[CDATA\[(.*)\]\]\/script/s','//![CDATA[\1//]]/script',$html); question - the output of this would be script type=text/javascript![CDATAjs code ... ]]/script

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael A. Peters
Michael A. Peters wrote: function makeHTML($document) { $buffer = $document-saveHTML(); $output = html_entity_decode($buffer,ENT_QUOTES,UTF-8); return $output; } I'll try it and see what it does. Huh - not tried above yet - but with $test = $myxhtml-createElement('p','שלום');

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael A. Peters
Michael A. Peters wrote: I wonder if the real utf8 problem people experience is really with loadHTML() and not with saveHTML() ?? Go to http://www.clfsrpm.net/xss/dom_script_test.php The page was meant to test something else but enter some UTF-8 into the textarea (well formed xhtml) -

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Raymond Irving
Michael, You are absolutely right! It's loadHTML() that's causing the problems. Best regards, __ Raymond Irving --- On Mon, 4/13/09, Michael A. Peters mpet...@mac.com wrote: From: Michael A. Peters mpet...@mac.com Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael Shadle
Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: Michael Shadle mike...@gmail.com Cc: Raymond Irving xwis...@yahoo.com, php- gene...@lists.php.net php-general@lists.php.net Date: Monday, April 13, 2009, 5:36 AM Michael A. Peters wrote: function makeHTML($document

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael Shadle
: Michael A. Peters mpet...@mac.com Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: Michael Shadle mike...@gmail.com Cc: Raymond Irving xwis...@yahoo.com, php- gene...@lists.php.net php-general@lists.php.net Date: Monday, April 13, 2009, 5:36 AM Michael A. Peters wrote

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Michael Shadle
On Mon, Apr 13, 2009 at 2:19 AM, Michael A. Peters mpet...@mac.com wrote: The problem is that validating xhtml does not necessarily render properly in some browsers *cough*IE*cough* I've never had problems and my work is primarily around IE6 / our corporate standards. Hell, even without a

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Raymond Irving
checkout: http://raxanpdi.com/examples.html __ Raymond Irving --- On Mon, 4/13/09, Michael Shadle mike...@gmail.com wrote: From: Michael Shadle mike...@gmail.com Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: Raymond Irving xwis...@yahoo.com Cc: php-general

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-13 Thread Raymond Irving
the utf-8 issue with loadHTML()? __ Raymond Irving --- On Mon, 4/13/09, Michael A. Peters mpet...@mac.com wrote: From: Michael A. Peters mpet...@mac.com Subject: Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument To: Michael Shadle mike...@gmail.com Cc: Raymond Irving xwis

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-12 Thread Michael Shadle
On Sun, Apr 12, 2009 at 8:07 AM, Raymond Irving xwis...@yahoo.com wrote: Hello, After talking with Michael about how to generate XHTML code using the DOM I came up with this little function that I'm thinking of using to generate XHTML code that's HTML compatible: function saveXHTML($dom)

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-12 Thread Raymond Irving
Hi Michael, --- On Sun, 4/12/09, Michael Shadle mike...@gmail.com wrote: If this will maintain utf-8 I might be able to use it :) which according to the last thread, saveHTML munges utf-8 stuff due to libxml... Hopefully this week I can give it a go. I think it should work just fine as

Re: [PHP] Generate XHTML (HTML compatible) Code using DOMDocument

2009-04-12 Thread Raymond Irving
It appears that the email system stripped out the #13; from this line: $html = str_replace('#13;','',$html); Best regards, __ Raymond Irving --- On Sun, 4/12/09, Raymond Irving xwis...@yahoo.com wrote: From: Raymond Irving xwis...@yahoo.com Subject: [PHP] Generate XHTML (HTML compatible)