View Single Post
Old 03-15-2010, 09:12 AM   PM User | #1
shanker.nair
New to the CF scene

 
Join Date: Mar 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
shanker.nair is an unknown quantity at this point
Question Extracting contents of CDATA section in XML using Javascript

Hi All,

I need to extract contents of CDATA section in XML using Javascript. The XML looks like this

Code:
<batsmen order="6">
  <fullname>S.Gosy</fullname> 
  <shortname>S.Gosy</shortname> 
  <batsmanid>4343</batsmanid> 
  <runs>8</runs> 
  <balls>10</balls> 
  <fours>2</fours> 
  <sixes>0</sixes> 
  <minutes /> 
- <howout>
- <![CDATA[ c  ]]> 
  </howout>
  <bowler>Langy</bowler> 
  <fielder>Shamy</fielder> 
  </batsmen>
Am at my wits end trying to extract the value inside CDATA which is "c". There seem to be spaces before and after "c".
Please help.

Regards,
Shanker
shanker.nair is offline   Reply With Quote