Dr_s99
02-06-05, 04:44 PM
Hello,
i have this code
<?php
$doc = new_xmldoc("1.0");
// Adding root node
$root = $doc->add_root("Book");
// Setting attribute for the root node
$root->set_attribute("Title","XML and PHP");
// Adding children to the root node
$title = $root->new_child("Author","John Williams");
$author = $root->new_child("Price","145");
$date = $root->new_child("PublishingDate", date("d-M-Y", mktime()));
echo $doc->dumpmem();
print "$new_xmldoc";
$fp = fopen("/var/www/html/add.xml", "w+");
fwrite($fp, $doc->dumpmem(), strlen($doc->dumpmem()));
return $xml;
?>
I keep getting this error...
Fatal error: Call to undefined function: domxml_doc_doctype()
my php version is 4.3.9
i have this code
<?php
$doc = new_xmldoc("1.0");
// Adding root node
$root = $doc->add_root("Book");
// Setting attribute for the root node
$root->set_attribute("Title","XML and PHP");
// Adding children to the root node
$title = $root->new_child("Author","John Williams");
$author = $root->new_child("Price","145");
$date = $root->new_child("PublishingDate", date("d-M-Y", mktime()));
echo $doc->dumpmem();
print "$new_xmldoc";
$fp = fopen("/var/www/html/add.xml", "w+");
fwrite($fp, $doc->dumpmem(), strlen($doc->dumpmem()));
return $xml;
?>
I keep getting this error...
Fatal error: Call to undefined function: domxml_doc_doctype()
my php version is 4.3.9