The problem you are running into is that � is and illegal XML
character :). If you check a Unicode chart (
http://www.cs.newcastle.edu.au/~c3018900/unicode.html#x0000 )
You'll notice from 0x001F down are control characters (this is the same
as ASCII I believe). Some non-printable control characters have a way of
pissing XML parsers off.

You might try to TRIM the values that might have those characters, I see
you are getting "news" from a database you might try cleaning it before
it goes in (Does that information come from some sort of old-school
feed?).

Cheers

On Sat, 2004-02-14 at 22:57, Dave Lyons wrote:
> im trying to output an xml file and having some troubles with this one section
> im assuming its because the field may contain html formatted info but i have even tried it with cdata but still i get this error.
>
> Illegal XML character: �.  
> Illegal XML character: �.
>
>
> i been up too  long to rack my brain tonight, any help?
>
>
>
> <cfquery name="news" datasource="#dsn#" username="#un#" password="#pw#">
> SELECT *
> FROM news
> ORDER BY newsID DESC
> </cfquery>
>
>
>
> <CFXML variable="newsXML">
>
> <News>
> <cfoutput query="news">
> <newsID>#news.newsID#</newsID>
> <title>#news.title#</title>
> <content>#news.content#</content>
> <pic>#news.pic#</pic>
> <update>#news.update#</update>
> </cfoutput>
> </News>
>
> </CFXML>
>
>
> <cffile
> action=""> > file="#ExpandPath('xml/news.xml')#"
> output="#ToString(newsXML)#">
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to