Re: Same XML, different type (XML Unserializer).

From: Date: Mon, 19 Apr 2004 18:52:34 +0000
Subject: Re: Same XML, different type (XML Unserializer).
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11402@lists.php.net to get a copy of this message
I stop using XML Unserializer cause this behaviour. At 18:47 19/3/2004 +0100, Dennis Pallett wrote:
Hey, I seem to be having a problem with the XML Unserializer. The XML below is exactly the same, except the above has two childs, and the bottom only one: <Authors>
        <Author>Seuss</Author>
        <Author>Theodor Seuss Geisel</Author>
</Authors> <Authors>
        <Author>Dr. Seuss</Author>
</Authors> XML Unserializer returns different datatypes though. For the above one it returns: [Authors] => Array
                (
                    [Author] => Array
                        (
                            [0] => Seuss
                            [1] => Theodor Seuss Geisel
                        )
                )
And for the bottom one: [Authors] => Array
                (
                    [Author] => Dr. Seuss
                )
As you can see this is very annoying, especially when I'm using it in combination with Smarty (I've spent an hour trying to debug this problem!). Any help on this one? Any easy solutions (which are preferably Smarty-compatible?) Thanks! -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


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