views:

126

answers:

0

Hi,

I've been developing an app which pulls in an XML file using Jquery. Everything is working well in all browsers but I noticed that the Safari is not picking up my CDATA value. When I alert the value its empty.

I am using this code : $('flight',xml).each(function(i) { deeplink = $(this).find("deeplink").text(); alert(deeplink); }

Here is the xml snip

Sure, Here you go.

<deeplink><![CDATA[http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=51806&amp;merchantID=2816&amp;programmeID=7676&amp;mediaID=0&amp;tracking=195974@Cheap Flight Tr&url=http://www.ebookers.com/partner/offsitesearch?triptype=roundtrip&amp;origin=LHR&amp;dest=SFO&amp;departdate=2010-02-20&amp;returndate=2010-02-27&amp;departspan=Anytime&amp;returnspan=Anytime&amp;adults=1&amp;type=AIR&amp;cabin=C&amp;locale=en_GB&amp;dc=XML&amp;dp=AffiliateFuture&amp;WT.mc_ev=click&amp;WT.mc_id=EBUK_AIR_AffiliateFuture&amp;selectKey=BA287LHRSFO0220C_BA286SFOLHR0227C&amp;selectedprice=GBP%7C454.30]]&gt;&lt;/deeplink&gt;

The above code works for every element but the CDATA. If I alert the XML I see the CDATA.

Does anyone know how to access or alert the data? Thanks Colsie