Re: Problems with Config - which leads to problems with XML_Parse

From: Date: Tue, 19 Aug 2003 13:57:30 +0000
Subject: Re: Problems with Config - which leads to problems with XML_Parse
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20052@lists.php.net to get a copy of this message
On 19 Aug 2003 at 15:35, Bertrand Mansion wrote: > <wentz@gmx.de> wrote : > > > Lukas Smith wrote: > > > >> I think the problem is in the Config container. > >> When you are reading in chunks you need to append the cdata to the > >> value you are storing. When a cdata is split up into two chunks the > >> cdata handler is called twice. > > > > Yes, thats it... > > should've looked into the code that the php-example produced: > > <item>inc_functions.php</item> > > was printed to > > inc_functions.php > > but in the source you'll see: > > <b>inc_fu</b><b>nctions.php</b> > > > > the character-handler ist called 2 times... > > Can you modify Config_Container_XML::cdataHandler like this and tell > me if it works any better : > > function cdataHandler($xp, $cdata) > { > $cdata = trim($cdata); > if ($cdata != '') { > $container =& > $this->containers[count($this->containers)-1]; > $container->setType('directive'); > $container->setContent($container->getContent().$cdata); > } > } // end func cdataHandler Wow Bertrand, really admiring :-) Didn't have time to look and the code yet and you already solved it ... that's cool, folks :-) Are you gonna submit a patch, please? Since Stephan said it works as expected ... Stefan

« previous php.pear.dev (#20052) next »