Hi,
I am currently trying to print out the raw XML data onto the screen to fix my habit of switching from one operating system to another everytime. The XML records the database information for the backend. Why is it that saveXML() is only printing out the user values and not the whole XML as shown on the PHP website? Here is the following code :
$dom = new DOMDocument( "1.0", "UTF-8" );
$dom->formatOutput = true;
$sys = $dom->createElement("system_variables");
$dom->appendChild($sys);
$db = $dom->createElement("database");
$sys->appendChild($db);
$db_schema = $dom->createElement("user");
$db->appendChild($db_schema);
$dbVar = $dom->createTextNode($_POST['DbUser']);
$db_schema->appendChild($dbVar);
$db_schema = $dom->createElement("pass");
$db->appendChild($db_schema);
$dbVar = $dom->createTextNode($_POST['DbPass']);
$db_schema->appendChild($dbVar);
$db_schema = $dom->createElement("host");
$db->appendChild($db_schema);
$dbVar = $dom->createTextNode($_POST['DbHost']);
$db_schema->appendChild($dbVar);
$db_schema = $dom->createElement("db");
$db->appendChild($db_schema);
$dbVar = $dom->createTextNode($_POST['DbName']);
$db_schema->appendChild($dbVar);
echo "Saving all the document:\n";
echo $dom->saveHTML() . "\n";
Thanks for any information,
Ratty