# Multiple XML documents in one FLA

**URL:** <https://forum.kirupa.com/t/multiple-xml-documents-in-one-fla/258486>\
**Category:** flash\
**Created:** [April 24, 2008, 2:04pm UTC](https://forum.kirupa.com/t/multiple-xml-documents-in-one-fla/258486 "2008-04-24T14:04:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobby2156](https://avatars.discourse-cdn.com/v4/letter/b/58f4c7/32.png) [@bobby2156](https://forum.kirupa.com/u/bobby2156)\
**Post date:** [April 24, 2008, 2:04pm UTC](https://forum.kirupa.com/t/multiple-xml-documents-in-one-fla/258486/1 "2008-04-24T14:04:17Z")

</div>

Hi, i’m trying to create a mix and match clothing application using flash for a school project but am having trouble with xml documents. Using an old gallery tutorial on the site, i found it was quite easy to load up one xml document, excerpt of code below.

I thought it would be as simple as copying all the code and changing the variable names to load a second xml document but i find when i run the code, that only the last xml document in the code loads, could anyone give me any tips? Thanks

function loadXML(loaded) {

```
if (loaded) {

	xmlNode = this.firstChild;
	image = [];
	description = [];
	total = xmlNode.childNodes.length;
	for (i=0; i&lt;total; i++) {

		image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
		description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;

	}
	firstImage();

} else {

	content = "file not loaded!";

}

```

}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“images.xml”); \*\*\*\*
