# How do I access xml data imported from an external as. file

**URL:** <https://forum.kirupa.com/t/how-do-i-access-xml-data-imported-from-an-external-as-file/303446>\
**Category:** Uncategorized\
**Created:** [January 20, 2010, 3:16pm UTC](https://forum.kirupa.com/t/how-do-i-access-xml-data-imported-from-an-external-as-file/303446 "2010-01-20T15:16:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sirrah](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@sirrah](https://forum.kirupa.com/u/sirrah)\
**Post date:** [January 20, 2010, 3:16pm UTC](https://forum.kirupa.com/t/how-do-i-access-xml-data-imported-from-an-external-as-file/303446/1 "2010-01-20T15:16:11Z")

</div>

I am using Action Script 3.

I have loaded some xml data using an external as file called importxml.as.  
If I put a trace statement in it to access the content it works perfectly.  
But how do I access the data from the Flash main timeline or from another as file?  
I am using the statement “import xmlimport” but if I then write:  
trace(xmldata.category[1].word[1].text); I get the message;

1120: Access of undefined property xmldata.

If I try this on the main timeline

var myXML:xmlimport=new xmlimport();

I get the error message

TypeError: Error #1010: A term is undefined and has no properties.
