PDA

View Full Version : Importing User Specific XML


daemonkin
11-26-2008, 03:59 PM
Hi guys,

Got a reasonable experience with importing XML files both static and automatically generated files.

I was trying to create user-specific XML files based on a sessionID and import these for each user's browsing of a site.

EG: A user goes to a gallery site, an XML is compiled of his viewings. He then goes to a Flash page and all his pictures he looked at are there to view.

I have it working for a static XML but I would like this more dynamic.

Any ideas?
Hopeful and desperate
D.

daemonkin
11-26-2008, 04:14 PM
This is currently what I use:

function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("murals.xml");

gnomeontherun
11-26-2008, 08:24 PM
I would think that you would have more luck by having a server script (like PHP) produce a dynamic XML sheet for your flash page. For example

xmlData.load("murals.php");

where the murals.php file actually outputs proper XML file based on the user.

How exactly do you track your users and how will you decide what the xml file should contain? I suppose that is the real question.