Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 1 made on Saturday February 21, 2009 at 02:41
Evohome
Active Member
Joined:
Posts:
April 2008
686
Hey guys,

I know this has to be simple, but I haven't figured it out yet. I am using the RSS feeds script from the PS website. For a specific feed, there's crap returned and displayed on every feed that I'd like to get rid of. Not sure of the technical term, but I am sure one of you might.


How can I kill this crap in the script (copied from XML source for RSS page):

"link" ![CDATA[ http://www.feedzilla.com blah blah blah blah ]] /"link"




I think the handling is located in this portion of the PS, but I need a little guidance please.


// this function will parse the XML page and displays the current feed
// it updates the screen
function DisplayFeed()
{
if ((xmlPage !== null)&& (FeedInitialised===false) )
{
var counter = 1;
for each (var item in xmlPage.channel.item)
{
if (counter == currentFeed)
{
// this is the feed you want, get all info
// strip out all html tags:
wHeadline.label = stripHtml(item.title + '\n').wordWrap(40, "\n", false).trim();
var strippedDesc =stripHtml(item.description + '\n');
DisplayedFeedLines = strippedDesc.wordWrap(75, "\n", false).trim().split("\n");
FeedInitialised=true;
}
counter++;
}
numberOfFeeds = counter-1;
wCounter.visible = true;
wCounter.label = currentFeed + " / " + numberOfFeeds;
}




The "link" section follows the "title" and "description" portions of the XML, which I'm sure might be pretty standard. I am hoping that the HTML stripping (in the script) is not necessary, as the entire "" portion of the XML should just be hidden, or not parse/ retrieve that portion of data.

**Had to delete the greater than and less than symbols above...

Last edited by Evohome on February 21, 2009 02:50.
And buyer beware of a man who chooses to be judged by numbers and salary, with no regard for character or integrity. Peter Gammons, ESPN


Hosting Services by ipHouse