[phpXML] Re: Entities
Brought to you by:
bs_php,
nigelswinson
From: <lu...@sa...> - 2001-10-08 17:20:48
|
Liz, I just tried, this doesn't work for me. I get good results only if this array is empty... Luc At 06:24 24/07/01 +0000, you wrote: >Thankz Luc, > >I checked the lines that you pointed me to and I thought I'd let you know >what I discovered: > >When reading though the file I thought !!! "wait a sec! HTML4.0 doesn't >specify an entity encoding for the apostrophe." > >I did some research. And sure enough, it is not an HTML entity. The simple ' >character is good enough. Also, the " for " is not truly needed in >HTML. > >By the way, in my file the semi-colon was missing in the ' entity >conversion array. > >The browser still couldn't handle the ' with the ; inserted, so I >adjusted the xml.php file to the ISO Latin set since I am not sure if this >conversion will be needed in another script that I write. > >122 /** >123 * var $entities = array ( "&" => "&", "<" => "<", ">" => >">", >124 * "'" => "&apos", '"' => """ ); >125 */ >126 var $entities = array ( "&" => "&", "<" => "<", ">" => >">", >128 "'" => "'", '"' => """ ); > >Now the CDATA Sections seems to render fine in IE5+. :-) > >I wonder why the ISO Latin codes were not used in xmlphp. Especially since >ISO 8859/1 is the 8-bit single-byte coded graphic character set. > >Thankz again :-) > >Liz Bostetter > > >-----Original Message----- >From: lu...@sa... [mailto:lu...@sa...] >Sent: Tuesday, July 24, 2001 12:12 AM >To: us...@li... >Subject: [phpXML] Re: phpxml Version 1.N.4 > > >Liz, > >I use phpxml for the same reason. > >In order to have a correct output I had to empty the array entities (near >line 123 >var $entities = array ( ); > >Luc > >At 03:09 24/07/01 +0000, you wrote: > >HI > > > >I am using xmlphp on a site that retreives an XML file from another server. > >The XML file contains > >CDATA Sections. > >When I try to display the contents of the XML file in a table in HTML to a > >browser all the apostrophe characters within the CDATA Section are being > >rendered as &apos as in (Picket's) (Picket&aposs). (I haven't checked to >see > >if other General Entity type characters do this also.) > >The results page's source code shows (Picket&aposs)..... missing >semi-colon? > > > >In the original XML file, the character is typed as a ' and not as the > >entity '. > > > >Any ideas out there of what is going on and how I could correct the HTML > >display? > > > >Thankz for any adive you can give. :-) > > > >Liz -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |