# XML attribute showing up as 'undefined'

**URL:** <https://forum.kirupa.com/t/xml-attribute-showing-up-as-undefined/203268>\
**Category:** Uncategorized\
**Created:** [October 9, 2006, 5:56pm UTC](https://forum.kirupa.com/t/xml-attribute-showing-up-as-undefined/203268 "2006-10-09T17:56:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lariat1997](https://avatars.discourse-cdn.com/v4/letter/l/df705f/32.png) [@lariat1997](https://forum.kirupa.com/u/lariat1997)\
**Post date:** [October 9, 2006, 5:56pm UTC](https://forum.kirupa.com/t/xml-attribute-showing-up-as-undefined/203268/1 "2006-10-09T17:56:36Z")

</div>

Hey all,

I am trying to access a file via XML in Flash 8, but I cannot even get it to show up in my output window. Below is the XML and the Flash code. Everytime I get an ‘undefined’ in the output window. I want the text ‘audio1.wav’ to display in the output window.

**ACTIONSCRIPT BELOW**  
[COLOR=Blue]var templateXML:XML = new XML();  
templateXML.ignoreWhite = true;  
templateXML.load(“template.xml”);

templateXML.onLoad = function(p\_success:Boolean):Void{  
if(p\_success){  
trace("::XML LOADING SUCCESSFUL::");  
trace(this.firstChild.childNodes[0].nextSibling.firstChild.firstChild.attributes.path);[/COLOR]

**XML BELOW**  
 [COLOR=Blue]\<!–This is an XML file for the VTS template–\>  
\<assets\>  
\<audios\>  
\<audio path=“audio/audio1.wav”/\>  
\<audio path=“audio/audio2.wav”/\>  
\<audio path=“audio/audio3.wav”/\>  
\<audio path=“audio/audio4.wav”/\>  
\<audio path=“audio/audio5.wav”/\>  
\<audio path=“audio/audio6.wav”/\>  
\<audio path=“audio/audio7.wav”/\>  
\<audio path=“audio/audio8.wav”/\>  
\<audio path=“audio/audio9.wav”/\>  
\<audio path=“audio/audio10.wav”/\>  
\<audio path=“audio/audio11.wav”/\>  
\<audio path=“audio/audio12.wav”/\>  
\<audio path=“audio/audio13.wav”/\>  
\<audio path=“audio/audio14.wav”/\>  
\<audio path=“audio/audio15.wav”/\>  
\</audios\>  
\<images\>  
\<image\>::TEST FOR IMAGE LOADING:: from the xml file.\</image\>  
\<image path=“images/cpp/image1.jpg”/\>  
\<image path=“images/cpp/image2.jpg”/\>  
\<image path=“images/cpp/image3.jpg”/\>  
\<image path=“images/cpp/image4.jpg”/\>  
\<image path=“images/cpp/image5.jpg”/\>  
\<image path=“images/cpp/image6.jpg”/\>  
\<image path=“images/cpp/image7.jpg”/\>  
\<image path=“images/cpp/image8.jpg”/\>  
\<image path=“images/cpp/image9.jpg”/\>  
\<image path=“images/cpp/image10.jpg”/\>  
\<image path=“images/cpp/image11.jpg”/\>  
\<image path=“images/cpp/image12.jpg”/\>  
\<image path=“images/cpp/image13.jpg”/\>  
\<image path=“images/cpp/image14.jpg”/\>  
\<image path=“images/cpp/image15.jpg”/\>  
\</images\>  
\<texts\>  
\<text path=“text/cpp/text1.txt”/\>  
\<text path=“text/cpp/text2.txt”/\>  
\<text path=“text/cpp/text3.txt”/\>  
\<text path=“text/cpp/text4.txt”/\>  
\<text path=“text/cpp/text5.txt”/\>  
\<text path=“text/cpp/text6.txt”/\>  
\<text path=“text/cpp/text7.txt”/\>  
\<text path=“text/cpp/text8.txt”/\>  
\<text path=“text/cpp/text9.txt”/\>  
\<text path=“text/cpp/text10.txt”/\>  
\<text path=“text/cpp/text11.txt”/\>  
\<text path=“text/cpp/text12.txt”/\>  
\<text path=“text/cpp/text13.txt”/\>  
\<text path=“text/cpp/text14.txt”/\>  
\<text path=“text/cpp/text15.txt”/\>  
\</texts\>  
\<movieclips\>  
\<movieclip path=“movieclip/cpp/movieclip1.swf”/\>  
\<movieclip path=“movieclip/cpp/movieclip2.swf”/\>  
\<movieclip path=“movieclip/cpp/movieclip3.swf”/\>  
\<movieclip path=“movieclip/cpp/movieclip4.swf”/\>  
\<movieclip path=“movieclip/cpp/movieclip5.swf”/\>  
\<movieclip path=“movieclip/cpp/movieclip6.swf”/\>  
\<movieclip path=“movieclip/cpp/movieclip7.swf”/\>  
\<movieclip path=“movieclip/cpp/movieclip8.swf”/\>  
\<movieclip path=“movieclip/cpp/movieclip9.swf”/\>  
\<movieclip path=“movieclip/cpp/movieclip10.swf”/\>  
\<movieclip path=“movieclip/cpp/movieclip11.swf”/\>  
\<movieclip path=“movieclip/cpp/movieclip12.swf”/\>  
\<movieclip path=“movieclip/cpp/movieclip13.swf”/\>  
\<movieclip path=“movieclip/cpp/movieclip14.swf”/\>  
\<movieclip path=“movieclip/cpp/movieclip15.swf”/\>  
\</movieclips\>  
\</assets\>[/COLOR]
