Re: Problem with appendChild and ellipsis... [message #173077 is a reply to message #173075] |
Sun, 20 March 2011 18:24 |
Dennis
Messages: 17 Registered: February 2004
Karma:
|
Junior Member |
|
|
On Sun, 20 Mar 2011 13:14:29 -0400, Jerry Stuckle
<jstucklex(at)attglobal(dot)net> wrote:
> Can you post the actual code which is failing (or, if it's too long, a
> complete example of the failure)?
Here's a short sample that illustrates the problem...
<?php
foo();
echo "test done<br>";
exit;
function foo()
{
$doc = new DOMDocument();
$doc->formatOutput = true;
$title = $doc->createElement("title");
$doc->appendChild($title);
$title_data = "Some data followed by an ellipsesÂ…";
$title_text = $doc->createTextNode($title_data);
$title->appendChild($title_text);
$doc->saveXML();
$doc->save("test.xml");
echo "foo done<br>";
}
?>
--
Dennis
|
|
|