Re: Error in Building an XML File

From: Date: Mon, 09 Mar 2009 15:33:08 +0000
Subject: Re: Error in Building an XML File
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-289675@lists.php.net to get a copy of this message
On Mon, Mar 9, 2009 at 9:53 AM, Bob McConnell <rvm@cbord.com> wrote: > From: Joe Harman >> >> I am using PHP to build an XML file, but I keep on getting an XML >> error when open the file in Google Chrome. >> > ------------------------------------------------------------------------ > --------- >> This page contains the following errors: >> >> error on line 30 at column 318: Entity 'iuml' not defined >> Below is a rendering of the page up to the first error. >> > ------------------------------------------------------------------------ > -------- >> Okay, Thanks... appears the problem is that I have foreign language entities in my HTML... Ugh I am sure this is not really the most efficient way to do this, but I tried using the following to get rid of these, but it appears that it just converts them to this i¿½... $search = explode(",","ç,æ,œ,á,é,í,ó,ú,à,è,ì,ò,ù,ä,ë,ï,ö,ü,ÿ,â,ê,î,ô,û,å,e,i,ø,u"); $replace = explode(",","c,ae,oe,a,e,i,o,u,a,e,i,o,u,a,e,i,o,u,y,a,e,i,o,u,a,e,i,o,u"); $decode_string = str_replace($search, $replace, html_entity_decode($row_rsFeed['full_desc'])) I am going to read up some more on sanitizing HTML Joe

« previous php.general (#289675) next »