function loadXMLs(str) 
	{
	try //Internet Explorer
	  {
	  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
	  xmlDoc.async="false";
	  xmlDoc.loadXML(str);
	  return(xmlDoc); 
	  }
	catch(e)
	  {
	  try //Firefox, Mozilla, Opera, etc.
		{
		parser=new DOMParser();
		xmlDoc=parser.parseFromString(str,"text/xml");
		return(xmlDoc);
		}
	  catch(e) {alert(e.message)}
	  }
	return(null);
	}
xmlstr='<rss version="2.0"> <channel> <title>Marketing Week - Latest News</title> <link>http://www.marketingweek.co.uk</link> <description>http://www.marketingweek.co.uk</description> <image> <url>http://www.marketingweek.co.uk/magazine/graphics/logo.png 					</url> <title></title> <link>http://www.marketingweek.co.uk</link> </image> <item> <title>Breast Cancer Care enables preference centre</title> <link>http://www.marketingweek.co.uk/disciplines/data-strategy/latest-news/breast-cancer-care-enables-preference-centre/3017750.article</link> <guid isPermaLink="true">http://www.marketingweek.co.uk/disciplines/data-strategy/latest-news/breast-cancer-care-enables-preference-centre/3017750.article</guid> <description>Personalised email campaigns and preference-driven selections have been enabled by Breast Cancer Care following a switch to on-demand email service provision.</description> <pubDate>Wed, 1 Sep 2010 00:00 GMT</pubDate> </item> <item> <title>Transactis launches real-time data linking</title> <link>http://www.marketingweek.co.uk/disciplines/data-strategy/latest-news/transactis-launches-real-time-data-linking/3017751.article</link> <guid isPermaLink="true">http://www.marketingweek.co.uk/disciplines/data-strategy/latest-news/transactis-launches-real-time-data-linking/3017751.article</guid> <description>Customer insight and database marketing company Transactis is enabling real-time linking of online data capture with offline customer information. Using a middleware solution that removes the need for disruptive changes to e-commerce applications, it will allow for real-time decision making using holistic customer information.</description> <pubDate>Wed, 1 Sep 2010 00:00 GMT</pubDate> </item> <item> <title>Harte-Hanks closes deal for Information Arts</title> <link>http://www.marketingweek.co.uk/disciplines/data-strategy/latest-news/harte-hanks-closes-deal-for-information-arts/3017752.article</link> <guid isPermaLink="true">http://www.marketingweek.co.uk/disciplines/data-strategy/latest-news/harte-hanks-closes-deal-for-information-arts/3017752.article</guid> <description>Harte-Hanks has formally acquired UK-based data-driven marketing services provider Information Arts to expand its footprint in B2B marketing across Europe. The American company took an exclusive option to acquire the British business in late 2007 and has finally exercised the call.</description> <pubDate>Wed, 1 Sep 2010 00:00 GMT</pubDate> </item> <item> <title>Cookie proposals would be "massive nuisance" </title> <link>http://www.marketingweek.co.uk/disciplines/data-strategy/cookie-proposals-would-be-massive-nuisance/3016302.article</link> <guid isPermaLink="true">http://www.marketingweek.co.uk/disciplines/data-strategy/cookie-proposals-would-be-massive-nuisance/3016302.article</guid> <description>Proposals to clarify the rules of online behavioural advertising have been heavily criticised for the impact they would have on consumers and marketers.</description> <pubDate>Tue, 27 Jul 2010 00:00 GMT</pubDate> </item> <item> <title>UK told to unleash Information Commissioner through new powers </title> <link>http://www.marketingweek.co.uk/disciplines/data-strategy/uk-told-to-unleash-information-commissioner-through-new-powers/3016305.article</link> <guid isPermaLink="true">http://www.marketingweek.co.uk/disciplines/data-strategy/uk-told-to-unleash-information-commissioner-through-new-powers/3016305.article</guid> <description>In an escalation of a row over how the Data Protection Directive has been implemented in the UK, the European Commission has given the British Government two months to come up with proposals for full compliance.</description> <pubDate>Tue, 27 Jul 2010 00:00 GMT</pubDate> </item> <item> <title>1-To-1 marketing works on women </title> <link>http://www.marketingweek.co.uk/disciplines/data-strategy/1-to-1-marketing-works-on-women/3016306.article</link> <guid isPermaLink="true">http://www.marketingweek.co.uk/disciplines/data-strategy/1-to-1-marketing-works-on-women/3016306.article</guid> <description>Experimental research carried out by the Rotterdam School of Management, Erasmus University has found that while both sexes develop customer loyalty, men tend to be more loyal to a company or brand, while women value personal relationships.</description> <pubDate>Tue, 27 Jul 2010 00:00 GMT</pubDate> </item> <item> <title>Equifax launches evidential SCV </title> <link>http://www.marketingweek.co.uk/disciplines/data-strategy/equifax-launches-evidential-scv/3016307.article</link> <guid isPermaLink="true">http://www.marketingweek.co.uk/disciplines/data-strategy/equifax-launches-evidential-scv/3016307.article</guid> <description>A new single customer view solution based on evidence of customer identity has been launched by Equifax.</description> <pubDate>Tue, 27 Jul 2010 00:00 GMT</pubDate> </item> <item> <title>Thompson &amp; Morgan builds marketing database</title> <link>http://www.marketingweek.co.uk/disciplines/data-strategy/thompson-and-morgan-builds-marketing-database/3016468.article</link> <guid isPermaLink="true">http://www.marketingweek.co.uk/disciplines/data-strategy/thompson-and-morgan-builds-marketing-database/3016468.article</guid> <description>Plant and seed merchant Thompson &amp;amp; Morgan is building a single customer and prospect view to drive its direct marketing activity. The company has appointed transactional data provider Abacus in partnership with database management consultancy Qbase to build the solution.</description> <pubDate>Tue, 27 Jul 2010 00:00 GMT</pubDate> </item> <item> <title>Data protection cases rise by 30 per cent</title> <link>http://www.marketingweek.co.uk/disciplines/data-strategy/latest-news/data-protection-cases-rise-by-30-per-cent/3016469.article</link> <guid isPermaLink="true">http://www.marketingweek.co.uk/disciplines/data-strategy/latest-news/data-protection-cases-rise-by-30-per-cent/3016469.article</guid> <description>The number of cases relating to data protection being handled by the Information Commissioner’s Office rose by 30 per cent in 2009/10 compared to the previous year. In the ICO’s annual report, published yesterday, productivity as well as reporting rates were both significantly higher, with 39 per cent more cases closed.</description> <pubDate>Tue, 27 Jul 2010 00:00 GMT</pubDate> </item> </channel> </rss> 	';
xmlDoc = loadXMLs(xmlstr);
var txt = '';
var txt = '';
items = xmlDoc.getElementsByTagName("item");
	for (i=0; i<4; i++) {
	
		var title="";
		var hlink="";
		var descr="";
		var pubdate="";
		var nma=""
date = items[i].getElementsByTagName("pubDate")[0].childNodes[0].nodeValue;
	result = date.match(/\d{1,2}.*\d{4}/);
	date = result[0];
	date = date.replace(/ /g,"-");if (items[i].getElementsByTagName("title")[0].length != 0)
title = items[i].getElementsByTagName("title")[0].childNodes[0].nodeValue;
nma = title.substring(0, title.indexOf(":"));
title = title.substring(title.indexOf(":") + 1, title.length );
if (items[i].getElementsByTagName("link")[0].length != 0)
hlink = items[i].getElementsByTagName("link")[0].childNodes[0].nodeValue;
if (items[i].getElementsByTagName("description")[0].childNodes.length != 0)
descr = items[i].getElementsByTagName("description")[0].childNodes[0].nodeValue;
		//descr = descr.substring(0,10);
txt += '<li><h2 style="font-weight:normal;"><a href="'+ hlink +'">' + title + '</a></h2></li>';
txt += '<div style="clear:both;"></div>'
}
document.write (txt);
