Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:6828 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19684 invoked by uid 1010); 7 Jan 2004 21:29:53 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 19620 invoked from network); 7 Jan 2004 21:29:53 -0000 Received: from unknown (HELO plain.rackshack.net) (207.44.182.3) by pb1.pair.com with SMTP; 7 Jan 2004 21:29:53 -0000 Received: from matt (blake.smeadlink.net [206.160.157.2]) (authenticated bits=0) by plain.rackshack.net (8.12.8/8.12.8) with ESMTP id i07LsIv5019629 for ; Wed, 7 Jan 2004 15:54:18 -0600 Reply-To: To: Date: Wed, 7 Jan 2004 14:28:22 -0700 Organization: MediaFence Message-ID: <03a001c3d565$2dcf7650$cc6464c5@RMAGSBS.local> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_03A1_01C3D52A.81709E50" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal Subject: SimpleXML and Default Cast To String From: blake@mediafence.com ("Blake Schwendiman") ------=_NextPart_000_03A1_01C3D52A.81709E50 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, If I have an XML document such: . This is some test text. . When I use simplexml_load_string and then do: print( $obj->para ); The result is: "This is some text." Note that the embedded text is missing. Internally, the cast is made using the xmlNodeListGetString function. Is there any reason that it makes more sense to do that rather than use the xmlNodeGetContent function. The latter function returns the complete text. I am a newbie to most of this, so there may be many reasons for the choice. If the former method is preferred, would it be possible to add another method for retrieving the text of a node using the xmlNodeGetContent function. I have added such a method to my beta 3 installation called toString() and it works fine. I would probably rename it for general redistribution. Thanks in advance! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Blake Schwendiman Software Development :: http://www.lulu.com/intechrabooks :: In-depth software development books priced right ------=_NextPart_000_03A1_01C3D52A.81709E50--