that's not a warning, that's a real error ... String does not have a property data, as Cay mentioned ... I wonder how you ever made this compile with FD in the first place ... did you compile with CS3 or with Flex SDK?
it should be something like
var data:XML = XML(file);
var id:int = data.item.id;/*if your xml looks something like
<%ROOT%>
<item>
<id>%SOMEINT%</id>
</item>
</%ROOT%>*/
by the way, with JSON, using as3corelib, it'd be
var data:XML = JSON.decode(file);
var id:int = data.item.id;/*if your JSON looks something like
{ item : { id: %SOMEINT% } }
JSON and XML have extremely different semantics, and XMLNode
, that you mentioned is ActionScript 2 Legacy, that you shouldnt use ... no offense, but I think you should look at either a JSON or XML/E4X tutorial, since you code and what you say, somehow leads me to believe, you didn't understand some fundamental things, such as the general process:
source string ---parsing/unmarshalling---> intermediary object tree ---traversal---> extracted data
neither can you operate on the source string directly, nor are the intermediary object trees freely exchangable, and thus traversal also depends on used data encoding format (you cannot traverse parsed JSON with E4X, but then again JSON is a semantically equivalent representation of ActionScript values)
greetz
back2dos