创建xml数据无法显示
formatoutput = true;
$root = $doc->createelement('book');
$root = $doc->appendchild($root);
$title = $doc->createelement('title');
$title = $root->appendchild($title);
$text = $doc->createtextnode('this is the title');
$text = $title->appendchild($text);
echo saving all the document:\n;
echo $doc->savexml() . \n;
echo saving only the title part:\n;
echo $doc->savexml($title);
?>
echo 出来只显示
saving all the document: saving only the title part:
xml的内容无法显示出来!
------解决方案--------------------
查看网页源文件