Hi,

I've been experimenting with using both simplexml and dom on the same document at the same time, and have run into a number of unexplainable PHP crashes unless I clone the domdocument object before using simplexml_import_dom()

Is it a design goal of simplexml to be able to use it simultaneously with dom, or is it important to use either a simplexmlelement or a domdocument for the same structure but not both? If so, I will add a note to the manual, but I wanted to check with the creators first.

A simplified version of the code I use is something like:

<?php
$blah = 'xml stuff'; // this is actually the contents of a package.xml extracted from disk
$d = new DOMDocument;
$d->loadXml($blah); // I do error checking here
$sx = simplexml_import_dom($d);
// manipulate document structure using dom
// retrieve values using simplexml for simple tags
?>


Thanks,
Greg

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to