Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26623 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9237 invoked by uid 1010); 15 Nov 2006 20:47:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 9222 invoked from network); 15 Nov 2006 20:47:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Nov 2006 20:47:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=ceo@l-i-e.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ceo@l-i-e.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain l-i-e.com from 67.139.134.202 cause and error) X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [67.139.134.202] ([67.139.134.202:2619] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BD/77-53553-DDC7B554 for ; Wed, 15 Nov 2006 15:47:25 -0500 Received: (qmail 11635 invoked by uid 98); 15 Nov 2006 20:47:26 -0000 Received: from 127.0.0.1 by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-1.25 (clamdscan: 0.88.4/2195. Clear:RC:1(127.0.0.1):. Processed in 0.246503 secs); 15 Nov 2006 20:47:26 -0000 X-Qmail-Scanner-Mail-From: ceo@l-i-e.com via o2.hostbaby.com X-Qmail-Scanner: 1.25 (Clear:RC:1(127.0.0.1):. Processed in 0.246503 secs) Received: from unknown (HELO l-i-e.com) (127.0.0.1) by localhost with SMTP; 15 Nov 2006 20:47:25 -0000 Received: from 208.195.234.246 (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Wed, 15 Nov 2006 14:47:25 -0600 (CST) Message-ID: <63531.208.195.234.246.1163623645.squirrel@www.l-i-e.com> In-Reply-To: <45588F5D.2010903@iamjochem.com> References: <45588119.5080207@gmail.com> <45588F5D.2010903@iamjochem.com> Date: Wed, 15 Nov 2006 14:47:25 -0600 (CST) To: "Jochem Maas" Cc: internals@lists.php.net Reply-To: ceo@l-i-e.com User-Agent: Hostbaby Webmail MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] SimpleXML: A bug or just an annoyance? From: ceo@l-i-e.com ("Richard Lynch") On Mon, November 13, 2006 9:29 am, Jochem Maas wrote: > that sounds about right. my experience with SimpleXML is that every is > either > a string, an object, an array depending on how you are looking at it > and regardless of > the situation auto-casting can be relied on to NOT do what you > want/expect ... > the most problematic thing I found with simpleXML was the complete > lack of means to > inspect an objects structure/content using funcs like var_dump() [it > seems > lots of __toString() magic lays waste to any attempt to look inside > the object] > > from what I gather the described 'annoyance' is indicative of the > prescribed > SimpleXML behaviour. > > I personally believe that SimpleXML is too clever and/or intuitive for > it's own good > - or maybe I'm just incredibly stupid, either way I decided a while > back to stick to > using the DOM extension for anything XML related because I found it so > much easier to > use and understand. +1 I couldn't figure *anything* out with SimpleXML because I could never actually "see" what my data was. I'd ask it what it was, and it would say it was an object, so I'd treat it like an object and it would bitch at me so I had to pretend the object was an array and then stumble down to the next node and start this infuriating process all over again. I sure hope somebody out there is getting something valuable out of it, though, as it's obvious somebody went to a lot of effort to make it do all those tricks. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?