You have to handle the html special chars.

& == &



On Thu, Jul 10, 2008 at 10:59 AM, Joakim Ling <[EMAIL PROTECTED]> wrote:

> Hi
>
>
>
> I'm using simplexml to create some xml files.
>
> Here's a stripped example, how can I get this to work? Tried millions
> different ways still no joy.
>
>
>
> <?php
>
> header("Content-type: text/xml");
>
>
>
> $xml = simplexml_load_string('<root></root>');
>
> $root = $xml->addChild('tests');
>
> $root->addChild('test', 'test & test');
>
>
>
> echo $xml->asXML();
>
> ?>
>
>
>
> // cheers jo
>
>

Reply via email to