# Loading several xml files

**URL:** <https://forum.kirupa.com/t/loading-several-xml-files/263209>\
**Category:** Uncategorized\
**Created:** [June 13, 2008, 11:37am UTC](https://forum.kirupa.com/t/loading-several-xml-files/263209 "2008-06-13T11:37:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iMike91](https://avatars.discourse-cdn.com/v4/letter/i/2bfe46/32.png) [@iMike91](https://forum.kirupa.com/u/iMike91)\
**Post date:** [June 13, 2008, 11:37am UTC](https://forum.kirupa.com/t/loading-several-xml-files/263209/1 "2008-06-13T11:37:26Z")

</div>

I would like to know how to load for example two xml files, and how to address each of the files?  
The red comments will explain what I want:)

function loadXML(loaded) {  
if (loaded) {  
[COLOR=“red”]Taking information from file “student.xml” --\>[/COLOR]  
\_root.names = this.firstChild.childNodes[1].childNodes[0].childNodes[0].firstChild.nodeValue;  
\_root.grade = this.firstChild.childNodes[1].childNodes[1].childNodes[0].firstChild.nodeValue;  
name\_txt.text = \_root.names;  
class\_txt.text = \_root.grade;  
[COLOR=“Red”]Taking information from file “Images.xml”–\>[/COLOR]  
\_root.picture = this.firstChild.childNodes[1].childNodes[0].firstChild.nodeValue;  
pic\_place.loadMovie(\_root.picture);

} else {  
trace(“file not loaded!”);  
}  
}  
xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“student.xml”,“images.xml”); [COLOR=“Red”]\<–loads two files[/COLOR]
