Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6838 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95099 invoked by uid 1010); 8 Jan 2004 01:44:33 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 95065 invoked from network); 8 Jan 2004 01:44:32 -0000 Received: from unknown (HELO fed1mtao08.cox.net) (68.6.19.123) by pb1.pair.com with SMTP; 8 Jan 2004 01:44:32 -0000 Received: from laptop ([68.2.117.88]) by fed1mtao08.cox.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with ESMTP id <20040108014431.WQJQ11788.fed1mtao08.cox.net@laptop>; Wed, 7 Jan 2004 20:44:31 -0500 Message-ID: <001d01c3d588$f638c510$6601a8c0@laptop> To: "Adam Maccabee Trachtenberg" , "Marcus Boerger" Cc: References: <03a001c3d565$2dcf7650$cc6464c5@RMAGSBS.local> <1491432467062.20040108004802@marcus-boerger.de> Date: Wed, 7 Jan 2004 18:44:28 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Subject: Re: [PHP-DEV] SimpleXML and Default Cast To String From: blake@mediafence.com ("Blake Schwendiman") BTW, I can send my source implementation of my toString() method which returns the full content. Then you can do what you need in terms of renaming, etc. Thanks! Blake Schwendiman ----- Original Message ----- From: "Adam Maccabee Trachtenberg" To: "Marcus Boerger" Cc: "Blake Schwendiman" ; Sent: Wednesday, January 07, 2004 4:59 PM Subject: Re: [PHP-DEV] SimpleXML and Default Cast To String > On Thu, 8 Jan 2004, Marcus Boerger wrote: > > > From my opinion the current behavior is perfect because i see simplexml from > > an xml developers side and not from an html developers side. The former must > > typically know exactly where his strings comme from while the latter has > > only text to deal with and often has situations where he needs to filter out > > formatting tags like the in the example. > > All of my SimpleXML work is strictly XML, too. However, my thought was > that I could always call strip_tags() to eliminate the information I > didn't want, but there was no apply_tags() function to do the > reverse. :) Therefore, it was better to use the other method. > > > So i'd say let us add a method for returning the complete content. Adam > > could you do that? > > That wouldn't be too difficult (although I am busy for the next day or > two). However, as much as I loathe toggles, I'm wondering if it > wouldn't be better to make this an object-wide setting. My thought are > that on an object-by-object basis, you either always want tags or > never want them. > > Something like: > > $sxe = simplexml_load_file('doc.xml'); > $sxe->displayTags = true; > > This would keep the interface clean. Or would that just confuse things > with more magic? > > Also, what would the default behavior should be? I can argue both > sides of the issue right now. :) > > -adam > > -- > adam@trachtenberg.com >