How will I parse this XML using jQuery?

<item>

<station></station>
<headline><![CDATA[]]></headline>
<showDate>12/28/2010</showDate>
<showTime></showTime>
<doorsOpen></doorsOpen>
<buylink></buylink>
<description><![CDATA[]]></description>
<pubDate>Mon, 27 Dec 2010 10:48:28 PST</pubDate>
</item>

I have to display month and date separately..

Write a javascript function which will accept the above xml as a parameter and than parse the xml using jquery.

function parseItemXML(itemXML){		
		$(itemXML).find('item').each(function(){//For each item element in the xml
			var showDateTxt = $(this).find('showDate').text(); //get the date
			var showDate = $.datepicker.parseDate( "mm/dd/yy", showDateTxt); //parse the date using the datapicker jquery ui component
			alert("Date:"+showDate.getDate()+" Month:"+(showDate.getMonth()+1));
		});
	}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.