# Help with XML and Flash, maybe simple for the Advanced flasher?

**URL:** <https://forum.kirupa.com/t/help-with-xml-and-flash-maybe-simple-for-the-advanced-flasher/165866>\
**Category:** flash\
**Created:** [October 14, 2005, 3:13pm UTC](https://forum.kirupa.com/t/help-with-xml-and-flash-maybe-simple-for-the-advanced-flasher/165866 "2005-10-14T15:13:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)\
**Post date:** [October 14, 2005, 3:13pm UTC](https://forum.kirupa.com/t/help-with-xml-and-flash-maybe-simple-for-the-advanced-flasher/165866/1 "2005-10-14T15:13:00Z")

</div>

Hi all,

I have currently been working with XML and Flash.

I am having a few small issues. I am after being able to advance through my nodes forward and back. I would assume this would be done using a function.

However am a bit lost, and need a helping hand

I am also in need of determining the amount of nodes held withing the xml file.

How can this be achieved, and advice or help would be very good at this time :).

Below is my code.

```auto

//XML Interaction with Flash
function loadXML(loaded) {
	
	if (loaded) {
		
		xmlNode = this.firstChild;

		//For loop
		for (i=0; i<total; i++) { total = xmlNode.childNodes.length; }
		
		client = xmlNode.firstChild.attributes.number;
		company = xmlNode.childNodes*.childNodes[0].attributes.name;
		photo = xmlNode.childNodes*.childNodes[0].attributes.photo;
		involvement = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
		description = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
		url = xmlNode.childNodes*.childNodes[3].attributes.link;
		
		//Trace ('file loaded successfully');
		note = "file loaded successfully";
	} else {
		//Trace ('error loading file');
		note = "error loading file";
	}
}

//XML Properties
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("home.xml");

stop();

```
