I have a deadline for this project (Monday). It worked great on the localhost, but when I uploaded it to our web server, I discovered that we do not have all of the DOM package enabled and I cannot use the function dom_import_simplexml(). My server admin is ignoring my requests, probably because of the short notice, and I cannot possibly rewrite the XML system into a database system that quickly.
This appears to be the only error I'm encountering. Please, if you have any alternative ideas, I'd love to hear them. I'm at a loss, because I can't find any other solution. All I have to do is create some XML elements and populate them with CDATA values, and I can't believe that this is not supported by SimpleXML!
Please, are there any alternatives you can think of? I'm open, because I don't know what I can do.
// Add a <pages /> element
$xml->addChild('pages');
// Populate it with data
foreach($pages as $page){
$new = $xml->pages->addChild('page');
$new->addAttribute('pid', $page['pid']);
$new->addAttribute('title', $page['title']);
if(isset($page['ancestor']))
$new->addAttribute('ancestor', $page['ancestor']);
$node = dom_import_simplexml($new);
$no = $node->ownerDocument;
$node->appendChild($no->createCDATASection($page['content']));
}
Those last three lines obviously won't work, and I don't know what else I can do with them!
Thank you so much for any help you can provide.