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

Login:
Pass:
 
 

Topic:
PS Question: How to delete <link> info from XML data
This thread has 1 response. Displaying all posts.
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
Post 2 made on Saturday February 21, 2009 at 14:39
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
email me a sample xml file that came from the RSS and the prontoscript that is manipulating the ECMA357 XML object and I'll have a look.
Lyndel McGee
Philips Pronto Addict/Beta Tester

Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse