Hi,
The question might sound (and probably is;-) stupid, but why doesnt the
follwing code work?? Is there something i dont see?
$doc = new DOMDocument('1. 0', 'iso-8859-1');
$doc->formatOutput = true;
$root = $doc->createElement( 'root');
$root = $doc->appendChild($r oot);
$head = $doc->createElement( 'head');
$head = $root->appendChild($h ead);
$title = $doc->createElement( 'title');
$title = $head->appendChild($t itle);
/* probably the real sign gets killed,
so here is the html: ä (an umlaut) */
$text = $doc->createTextNode ('ä');
$text = $title->appendChild($t ext);
echo $doc->saveXML();
Thanks in advance
The question might sound (and probably is;-) stupid, but why doesnt the
follwing code work?? Is there something i dont see?
$doc = new DOMDocument('1. 0', 'iso-8859-1');
$doc->formatOutput = true;
$root = $doc->createElement( 'root');
$root = $doc->appendChild($r oot);
$head = $doc->createElement( 'head');
$head = $root->appendChild($h ead);
$title = $doc->createElement( 'title');
$title = $head->appendChild($t itle);
/* probably the real sign gets killed,
so here is the html: ä (an umlaut) */
$text = $doc->createTextNode ('ä');
$text = $title->appendChild($t ext);
echo $doc->saveXML();
Thanks in advance
Comment