Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15016 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92287 invoked by uid 1010); 14 Feb 2005 12:25:57 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 92261 invoked by uid 1007); 14 Feb 2005 12:25:57 -0000 Message-ID: <20050214122557.92260.qmail@lists.php.net> To: internals@lists.php.net Date: Mon, 14 Feb 2005 13:23:44 +0100 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 82.161.18.62 Subject: toString() in SimpleXML? From: leendert@thewebmen.com (Leendert Brouwer) Hi, I have a feature request. Maybe it would be a good idea to have a toString() or perhaps nodeValue() method in SimpleXML's SimpleXMLElement class? It might make it more obvious that the element is still a SimpleXMLElement object when you want to actually use it (when you print it, the value automagically casts to a string internally, so users might think that it will be casted to a string when you directly access it without a specified property/method, which is not the case). I know that the docs say that you should cast it to a string when you want to do a comparison, but apart from that just being an example, maybe my suggestion is a more obvious one to notice? regards, Leendert