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

From: Date: Tue, 19 Aug 2003 13:35:00 +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-20050@lists.php.net to get a copy of this message
<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 Thanks, Bertrand Mansion Mamasam

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