Spoke too soon.  Let me provide some more detail and hopefully I can
get an answer.
I have a restaurant database that includes Google maps info (lat, lng
etc).  The restaurant names and the mini comments contain € ' & and
possibly other symbols, and they all get extracted from the database
using the Google's genxml, i.e:
function parseToXML($htmlStr)

{

$xmlStr=str_replace('<','&lt;',$htmlStr);

$xmlStr=str_replace('>','&gt;',$xmlStr);

$xmlStr=str_replace('"','&quot;',$xmlStr);

$xmlStr=str_replace("'",'&apos;',$xmlStr);

//$xmlStr=str_replace('€','&euro;',$xmlStr);
$xmlStr=str_replace('&','&amp;',$xmlStr); //goes last to translate all
& from above
return $xmlStr;

}
...
while ($row = @mysql_fetch_assoc($result)){

  // ADD TO XML DOCUMENT NODE

  echo '<marker ';

  //echo 'name="' . $row['resto_name'] . '" ';

  echo 'name="' . parseToXML($row['resto_name']) . '" ';
  //echo 'name="' . utf8_encode($row['resto_name']) . '" ';
  echo 'address="' . $row['resto_address'] . '" ';

  echo 'tel="' . $row['resto_tel'] . '" ';

  echo 'lat="' . $row['resto_lat'] . '" ';

  echo 'lng="' . $row['resto_lng'] . '" ';

  echo 'qName="' . $row['resto_qName'] . '" ';

  echo 'colour="' . $row['resto_colour'] . '" ';


I've tried what feels like every permutation in the while statement,
sometimes put &euro; in the database; etc. but can't find a way that
also keeps IE6 happy without breaking modern browsers.  Is there
something I am missing?

HB


On Jan 4, 3:18 pm, Hotbelgo <[email protected]> wrote:
> Thanks I got IE6 compatibility through so combination of your \n
> suggestion, parseToXML() for fields likely to have utf-8 characters
> in, editing the database to remove a € symbol, and using header
> ("Content-type: text/xml; charset=utf-8");
>
> HB
>
> On Jan 4, 10:58 am, "warden [Andrew Leach - Maps API Guru]"
>
> <[email protected]> wrote:
> > On Jan 4, 9:51 am, Hotbelgo <[email protected]> wrote:
>
> > > Hi,
> > > I tried this with my site and got the following 
> > > errors:http://www.feedvalidator.org/check.cgi?url=http://www.amsterdamfoodie...
>
> > The only error I get is "undefined root element", which isn't a
> > problem. The Help for that error says "If it is an undefined root
> > element, then the document you are trying to validate is not a feed."
> > and it isn't. It's an ordinary XML file. Specifying a DTD may help
> > with that, but that's a lot of work which you can get away without.
>
> > You would find it easier to validate if you included \n characters in
> > your echo statement so that each XML element was on a new line.
>
> > Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to