RE: [PHP] Problem with xml_parse_into_struct

From: Date: Thu, 30 Jan 2003 11:18:57 +0000
Subject: RE: [PHP] Problem with xml_parse_into_struct
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-133626@lists.php.net to get a copy of this message
> >I have various XML files that might contain <> tags inside the element > body, for example: > > > ><news id="1" shortDescription="Stuff Happened Today">Today on > <b>1/29/03</b>, stuff happened</news> > > > Your XML is not well formed, not properly nested use: > > <news id="1" shortDescription="Stuff Happened > Today"><![CDATA[Today on > <b>1/29/03</b>, stuff happened]]></news> > > This way the XML parser wil accept <b> and </b>, otherwise it sees it as > XML elements. I hope this helps. Wouldn't another option be to use HTML entities for anything in your data? Use &lt; for <, &gt; for >, etc... so XML will not recognize it? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.general (#133626) next »