How to fetch live data from stcok market using rss feed live using Yahoo Query language . And using this I'm getting data from the market like below :
<results>
<item>
<title><![CDATA[SENSEX : 20850.74 * 451.32 (2.21 %)]]></title>
<link/>
<pubDate>11/18/2013 4:00:00 PM</pubDate>
<author>BSEIndia</author>
<guid/>
</item>
</results>
Now using Java script I am displaying the data in UI , the javascript is below:
function SensexRSS(o) {
var items = o.query.results.item;
var output = '';
var title = items.title;
output += "BSE" + " " + title;
}
// Place news stories in div tag
document.getElementById('bsesensex').innerHTML = output;
}
As a result the UI shows the data like : BseSensex : 20850.74 * 451.32 (2.21 %)
Now I want to split this text and remove the * and () symbols and try to show color like green(for Up market) and red (for down market)
Can anyone tell me please how tot format or split the data from ![CDATA[...] that is above inside ....