JQuery call to XML CDATA is blank

JQuery call to XML CDATA is blank

I have an xml that I am trying to read the contents of a node with where the contents for display are held inside of a CDATA tag:

here is the xml:
<FIELD_1 display_name="Last Name" element_type="t" data_type="alpha">
<![CDATA[ Smith
  ]]>
  </FIELD_1>
<FIELD_2 display_name="First Name" element_type="t" data_type="alpha">
<![CDATA[ John
  ]]>
  </FIELD_2>
<FIELD_3 display_name="Location Code" element_type="t" data_type="alpha">
<![CDATA[ CA2390
  ]]>
  </FIELD_3>


and my jquery is this:
$('ROW',xml).each(function(i) {
lastName = $(this).find("FIELD_1").text();
firstName = $(this).find("FIELD_2").text();
Office = $(this).find("FIELD_3").text();


this is resulting in nothing being pulled. Is the call to ".text()" not correct or am I missing something else here? I just want to return the text held within each CDATA field...thanks!
    • Topic Participants

    • bolo