Re: outputting xml with DOM and ampersands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 12 October 2005 12:40 pm, jonathan wrote:
> I am trying to output a file using DOM with php5.
>
> It gives me an error with something like the following:
> <item_name>farm lettuces with reed avocado, cr&egrave;me
> fra&icirc;che, radish and cilantro</item_name>

Are you doing a: 
DOMDocument::loadXML('<item_name>farm lettuces with reed avocado, cr&egrave;me 
fra&icirc;che, radish and cilantro</item_name>');

You may have to manually convert the & to &amp; tho I thought it did an 
automatic convertion.

>
> It does have the encoding set to utf-8. When I switch it to utf-16,
> it gives me an error on the $dom->saveXML();
>
> Any ideas about how to fix this?
>
> -jonathan

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux