Create an use a transactional XML Container:
add a document, get the document, display the content of
the document.
EXPECTED RESULT:
book1 = Knowledge Discovery in Databases.
ACTUAL RESULT:
Knowledge Discovery in Databases.';
foreach(array_merge(glob("__db*"), glob("log.O"), glob("test*.dbxml")) as $file)
{
@unlink($file);
}
$env = new Db4Env();
$env->open();
$mgr = new XmlManager($env);
$con = $mgr->createContainer("test.dbxml");
$con->putDocument($book_name, $book_content);
$doc = $con->getDocument($book_name);
$s = $doc->getContentAsString();
print $doc->getName(). " = $s\n";
$con->close();
$mgr->removeContainer("test.dbxml");
$env->close();