Re: XML Serializer Question

From: Date: Wed, 29 Apr 2009 21:43:52 +0000
Subject: Re: XML Serializer Question
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-29833@lists.php.net to get a copy of this message
On Sat, Apr 25, 2009 at 6:21 PM, Marcelo Barbudas <nostef@gmail.com> wrote: > [This message has been brought to you via pear.php.net.] > > Hi, > > Sorry to bother you, I've been looking through examples online and > couldn't find anything. > > I am using XML_Unserializer to parse something like: > > <objects type="array"> > > <object> > <blaa>d</blaa> > </object> > </objects> > > If there is only one object then Unserialize returns just that one > object. > > If there are more it correctly returns an array. > > I would like Unserializer to return an array even if there is only one > object. > > Is that possible? > > -- > M. > I believe setting the *XML_UNSERIALIZER_OPTION_COMPLEXTYPE* option to "array" is what you're looking for... -- CRB

« previous php.pear.general (#29833) next »