PDA

View Full Version : Loading data from Multiple XML files



netfunda
November 2nd, 2004, 02:47 AM
I want to load data into a flash movie from two or more different XML files.

I loaded first file with xml.load("myxml.xml")

when i added other xml as same directive as above, it didn't worked.

Please help!

memega
November 2nd, 2004, 08:31 AM
Each variable can hold only one XML document at once. You should either copy the loaded contents into another variable:var xml = new XML();
xml.load("firstfile.xml");
...
var firstxml = xml;
xml.load("secondfile.xml");
...
var secondxml = xml;Or load each document into a new variable, like var firstxml = new XML();
firstxml.load("firstfile.xml");
var secondxml = new XML();
secondxml.load("secondfile.xml");