0

Here is the scenario:

OLD XML data was in the form of :

<data>
<![CDATA[[<span class='css'>SomeData XYZ</span>]]>
</data>

Now a sub element has cropped up in some of the data:

<data>
<![CDATA[[<span class='css'>SomeData XYZ</span>]]>
<subelement>
     SubData ABC
</subelement>
</data>

with the previous format you could get the "SomeData XYZ]]" using: myXML.data

However, now if one tries that you get the entire body within the data tag including the subelements.

I also tried just myXML.data.text but it returned nothing also tried .* (returned everything between data tags)

Stumped.

TSage
  • 17
  • 3

1 Answers1

0

You can access that link as the first child of myXML:

var someData:String = myXML.children()[0];

Edit: You said you tried myXML.data.text, if data is the root element, that won't work. You should try myXML.text(); That should return any text within the XML that's not part of a child-element.

Marcela
  • 3,728
  • 1
  • 15
  • 21
  • I did see this through the debugger, however that CDATA line may not always be the first line. – TSage Nov 25 '14 at 23:31