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
The goal is to be able to use it simultaneously.
Can you file a bug report and include code that produces the crash?
Rob
----- Original Message -----
From: Greg Beaver
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.
Rob Richards wrote:
The goal is to be able to use it simultaneously.
Can you file a bug report and include code that produces the crash?Rob
Sure, it's complicated code, so I'll try to get it all into 1 file and
under 20 lines.
Greg