Re: Extension to return SimpleXML object

From: Date: Fri, 27 Jun 2008 16:58:28 +0000
Subject: Re: Extension to return SimpleXML object
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5575@lists.php.net to get a copy of this message
Hi, On Fri, Jun 27, 2008 at 6:41 PM, Tony Ser <tser@deltacontrols.com> wrote: > Hi, > > We are implementing our own extension and in a lot of cases we would like to > return complex data. > XML will be a natural choice except that we don't want to format the complex > data into string, return the xml string and have the PHP Script parse it > before manipulating the content. It will be very inefficient. > > Wonder if there is a way to return the standard SimpleXML object and the > script will able to use it right away. > Or any other suggestion to return complex data ? Create a class as storage for your complex data? This class can still have a method exportAsXml, or getAsJsonl or whatever is the desired format. Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org

« previous php.pecl.dev (#5575) next »