Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18227 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32284 invoked by uid 1010); 19 Aug 2005 19:04:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 32269 invoked from network); 19 Aug 2005 19:04:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2005 19:04:10 -0000 X-Host-Fingerprint: 64.233.170.193 rproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.170.193:43194] helo=rproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id CB/E6-33075-A2D26034 for ; Fri, 19 Aug 2005 15:04:10 -0400 Received: by rproxy.gmail.com with SMTP id g11so597764rne for ; Fri, 19 Aug 2005 12:04:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Cc2oHjdkU+VAwkaBMNWssghGiA4cKYQF8z6q5x8/ORvwnZGUnG7q+hTKEu/ZXLrQsTOG75ABb2UhK2PaoavBYzVBsqGsV2uaJRRA/2HYMOfciGdTdVwzK6XjUrBu+dTF8BPS/cjltp9/eF/++vHSvC1sJDwoniSXgPm75hcV/Qw= Received: by 10.38.73.79 with SMTP id v79mr243080rna; Fri, 19 Aug 2005 12:04:07 -0700 (PDT) Received: by 10.38.10.25 with HTTP; Fri, 19 Aug 2005 12:04:06 -0700 (PDT) Message-ID: <24e5f3b705081912045e18fea2@mail.gmail.com> Date: Fri, 19 Aug 2005 12:04:06 -0700 Reply-To: sterling@apache.org To: Rob Richards Cc: Rasmus Lerdorf , Adam Maccabee Trachtenberg , internals@lists.php.net In-Reply-To: <4305F81A.5090606@ctindustries.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <43054765.3000208@lerdorf.com> <430593FF.6020907@lerdorf.com> <4305F81A.5090606@ctindustries.net> Subject: Re: [PHP-DEV] Simplexml and xml namespaces From: sterling.hughes@gmail.com (Sterling Hughes) I agree. var_dump() should accurately expose the structure of the simplexml object, if people want to see *everything* they should dump it explicitly (there is a method in the DOM api to do this?) -Sterling On 8/19/05, Rob Richards wrote: > Rasmus Lerdorf wrote: >=20 > >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. >=20 > Rob >=20 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20 >