so I decided it would be best just to convert back to the original format so for this string: $string="braised beef shortribs with sautéed greens, pearl onions and horseradish cream"

I do an html_entity_decode($string);

but this still gives me an error when I add it via the DOM functions but render with the รจ in php. If I look at the xml in firefox on a mac, it looks like this:

<name>braised beef shortribs with saut?ed greens, pearl onions and horseradish cream</name>

I know that this is a basic question but how could I get this go through?

Here is how I'm actually adding via the DOMDocument class:

$name->appendChild($dom->createTextNode (html_entity_decode($item_row[slot])));
                        $item->appendChild($name);

Is there any way I could on the client side query the xml string for the encoding to be sure that that in fact is utf-8? The first line of the generated xml is:
<?xml version="1.0" encoding="utf-8"?>

thanks for any help.

-jonathan

On Oct 16, 2005, at 1:36 AM, ac wrote:

try this,
if you need more entities to be included,
just refer to
`http://www.w3.org/2003/entities/iso8879/isolat1.ent' or find out its
charcode by yourself.

<?xml version="1.0"?>
<!DOCTYPE html [
 <!ENTITY egrave "&#x00e8;">
 <!ENTITY icirc "&#x00ee;">
]>
<item_name>farm lettuces with reed avocado, cr&egrave;me
 fra&icirc;che, radish and cilantro</item_name>


On 10/13/05, jonathan <[EMAIL PROTECTED]> wrote:

I'm now getting this error:

XML Parsing Error: undefined entity

with the following entity at the first ampersand:
<item_name>farm lettuces with reed avocado, cr&egrave;me
fra&icirc;che, radish and cilantro</item_name>

Why is an ampersand considered an undefined entity? The xml version
is: <?xml version="1.0"?>

Any thoughts please?

-jonathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
all born, to be dying

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to