Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jun 2007
    Location
    N. Ireland
    Posts
    351
    Thanks
    16
    Thanked 4 Times in 4 Posts

    Importing User Specific XML

    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.
    If this was helpful, please add to my reputation
    Thousand Sons - Freelance Web Developer - ninetyonedegrees.com

  • #2
    Regular Coder
    Join Date
    Jun 2007
    Location
    N. Ireland
    Posts
    351
    Thanks
    16
    Thanked 4 Times in 4 Posts
    This is currently what I use:
    Code:
    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");
    Daemonkin.
    If this was helpful, please add to my reputation
    Thousand Sons - Freelance Web Developer - ninetyonedegrees.com

  • #3
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    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

    Code:
    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.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •