Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18224 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 14484 invoked by uid 1010); 19 Aug 2005 15:11:44 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 14469 invoked from network); 19 Aug 2005 15:11:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2005 15:11:44 -0000 X-Host-Fingerprint: 216.117.147.250 unknown Linux 2.4/2.6 Received: from ([216.117.147.250:53530] helo=ctindustries.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 29/D8-33075-FA6F5034 for ; Fri, 19 Aug 2005 11:11:44 -0400 Received: from [127.0.0.1] (dsta-aa203.pivot.net [66.186.171.203]) (authenticated bits=0) by ctindustries.net (8.12.8/8.12.8) with ESMTP id j7JE2CtI002778; Fri, 19 Aug 2005 10:02:16 -0400 Message-ID: <4305F81A.5090606@ctindustries.net> Date: Fri, 19 Aug 2005 11:17:46 -0400 User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Rasmus Lerdorf CC: Adam Maccabee Trachtenberg , internals@lists.php.net References: <43054765.3000208@lerdorf.com> <430593FF.6020907@lerdorf.com> In-Reply-To: <430593FF.6020907@lerdorf.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.86.2/1034/Thu Aug 18 16:07:58 2005 on ctindustries.net X-Virus-Status: Clean Subject: Re: [PHP-DEV] Simplexml and xml namespaces From: rrichards@ctindustries.net (Rob Richards) Rasmus Lerdorf wrote: >Yeah, I agree actually. My real beef is that simplexml and var_dump() >don't place nicely with each other. var_dump() ends up lumping the >namespaced elements in with the non-namespaced elements of the same >name, but when you iterate through things manually they are not lumped >together and the only way to get at the namespaced elements is by >checking for them directly with the appropriate children() call. > >I am fine with having to manually dereference the namespace and keeping >things completely separate. I'd just like it to be easier for people to >use var_dump() on a simplexml object and not have it confuse the heck >out of them by showing them arrays with 2 elements in them which when >they iterate only get 1 or if they call count() on it only get 1. > > It doesnt look difficult to make var_dump respect the namespace set by the initial sxe object for subobjects. If it were to be changed I would also suggest not returning non element type nodes as well. Right now PI, Comments, etc.. get returned by var_dump but these aren't considered sxe properties either. Rob