Reply to Re: [PHP] outputting xml with DOM and ampersands

Your name:

Reply:


Posted by Stephen Leaf on 10/13/05 05:16

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация