Re: [xml] character data

From: Date: Tue, 28 Oct 2003 08:57:52 +0000
Subject: Re: [xml] character data
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-167857@lists.php.net to get a copy of this message
Tom Rogers wrote:
Hi, Saturday, October 11, 2003, 6:26:01 AM, you wrote: DA> I do not understand why this line does not work : DA> $info[$element] = $content; DA> but yet this works: echo $content; DA> why? what is the trick?
[ snipped ]
the function characterData can be called with whitespace which is probably overwriting your content try this $content = trim($content); if(!empty($content)) $info[$element] = $content;
Or you can strip all the whitespace from the xml document and send that in. -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com

« previous php.general (#167857) next »