Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:5003 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27255 invoked by uid 1010); 26 Oct 2003 04:44:15 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 27230 invoked from network); 26 Oct 2003 04:44:15 -0000 Received: from unknown (HELO smtp1.ActiveState.com) (209.17.183.249) by pb1.pair.com with SMTP; 26 Oct 2003 04:44:15 -0000 Received: from smtp3.ActiveState.com (smtp3.ActiveState.com [192.168.3.19]) by smtp1.ActiveState.com (8.12.10/8.12.10) with ESMTP id h9Q4fcNA002797; Sat, 25 Oct 2003 21:41:39 -0700 (envelope-from shane@caraveo.com) Received: from caraveo.com (smtp3.ActiveState.com [192.168.3.19]) by smtp3.ActiveState.com (8.12.9/8.12.9) with ESMTP id h9Q4fckl022797; Sat, 25 Oct 2003 21:41:38 -0700 Message-ID: <3F9B5081.1060203@caraveo.com> Date: Sat, 25 Oct 2003 21:41:37 -0700 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Robert Richards CC: internals@lists.php.net References: <005101c39b26$d814cc10$f7dea8c0@cyberware.local> In-Reply-To: <005101c39b26$d814cc10$f7dea8c0@cyberware.local> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] simplexml and dom interop From: shane@caraveo.com (Shane Caraveo) So my only comment on this is that the import functions should do some kind of error (domexception, or a php error) if the support for the other is not compiled in. This would just be freindlier to the developer to know why the call is failing (rather than just getting function not defined). Otherwise, I have not gotten around to testing the patch tonight, as something else is causing crashes for me. Shane Robert Richards wrote: > If anyone is playing around with simplexml, dom and/or xsl, I have a patch for the interoperability between simplexml and dom. I am leary about committing it right now as it has limited testing, beta 2 is being released next week and I am leaving on tuesday for a week or two, so wont be able to fix any issues that might arise from it. > > patch - http://www.ctindustries.net/patches/interop.diff.txt > example script - http://www.ctindustries.net/patches/interop.php.txt > > The changes include: > simplexml > new function: simplexml_import_dom(domnode) returns an sxe object > behavior change: setting the value of an element will do just that. I removes all child nodes unlike previous version which would change the value of the first child node of the reference node (I dont believe this was the intended behavior) > the change in behavior and the integration with the functions from the libxml extension should resolve a lot of the libxml memory leaks > > dom > new function: dom_import_simplexml(sxe) returns domnode > also a minor change to clonenode method of domnode > > Let me know if people really want this in the beta release otherwise i am going to wait until after I get back to further test and commit this stuff. > > Rob