homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
Forum Library, Charter, Moderators: bill & werty

RSS, ATOM, and Related Technologies Forum

Problem with xml and charictors
escaping problems.

WebmasterWorld Administrator mack us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 257 posted 5:13 am on May 18, 2005 (gmt 0)

Hi all,

I have been working on a script to prooduce a dynamic xml feed and have hit a problem.

My feed is based on a dynamic .cgi page. What I have done is create a page in php to form the bases of the rss feed. then call the .cgi as an include. My php page is renamed to .rss and I has set up the server via .htaccess to render this .rss file as a php page.

The .cgi file is basicaly a template page for a search interface.

The php (rss) page...

<? header('Content-type: text/xml');?>
print "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
<title>feed title</title>
<description>info about the feed</description>
<copyright>Copyright all rights reserved</copyright>
include "http://www.example.com/cgi-bin/rss.cgi?q=$term" ;

The .cgi file that is being included in the abouve file is like folows...


The problem is that the output looks very bad. The cdata commands are removing certain charictors and replacing then with alternative (legal)charictors liek nbsp; etc

Can anyone suggest a suitable alternative to cdata or a workround to help tidy up my feed.

Thank you very much in advance.



Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / RSS, ATOM, and Related Technologies
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved