# Introduction to XML in Flash, Hands-on issue

**URL:** <https://forum.kirupa.com/t/introduction-to-xml-in-flash-hands-on-issue/323530>\
**Category:** Uncategorized\
**Created:** [July 5, 2011, 3:55pm UTC](https://forum.kirupa.com/t/introduction-to-xml-in-flash-hands-on-issue/323530 "2011-07-05T15:55:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CrAzYoNi](https://avatars.discourse-cdn.com/v4/letter/c/bb73d2/32.png) [@CrAzYoNi](https://forum.kirupa.com/u/CrAzYoNi)\
**Post date:** [July 5, 2011, 3:55pm UTC](https://forum.kirupa.com/t/introduction-to-xml-in-flash-hands-on-issue/323530/1 "2011-07-05T15:55:55Z")

</div>

Hi all,  
I’ve read today the tutorial - Introduction to XML in Flash //which is awesome!!

Though I’ve failed to develop a code based on this tutorial - just for check if I succeed to grab a “end” value and insert it inside a Textbox.

I’m getting the error:

> 

TypeError: Error #1006: value is not a function.  
at xml2txt\_Scene1\_fla::MainTimeline/frame1()

And If Im removing the .load command I’m not getting any output at all…

I’ve attached the content of the FLA & XML files.  
Please assist me.

The FLA content:

```auto

function XML2TXT(my_xml){
	var path = my_xml.firstChild.childNodes;
	for (var i=0; i<path.length; i++) {
		if(path*.attributes.type == "count"){
			//Textbox1.text = path*.childNodes.nodeValue;
			Textbox1.text = "Yes!";
		}
		else Textbox1.text = "No!";
	}
}

var global_xml = new XML();
global_xml.ignoreWhite = true;

global_xml.onLoad = function(success){
	if(success) XML2TXT(this);
	else trace("Error loading XML file"); // no success? trace error (wont be seen on web)
}	

global_xml.load("files.xml");

```

The excel file content:

```auto

<PhotosGallery>
	
	<item type="pic">
		<image>DSC_0500.jpg</image>
		<image>DSC_0564.jpg</image>
		<image>DSC_5121.jpg</image>
		<image>DSC_5169.jpg</image>
		<image>DSC_5216.jpg</image>
	</item type="pic">
	
	<item type="count">
		<value>5</value>
	</item type="count">
	
</PhotosGallery>

```
