XMLLoader Class 3.0

Quickly load and manage Multiple XML files.

Clemente Gomez is cg219 on Activeden
Add Comment

Discussion 11 Comments

  1. Vlasnn says:

    Would be cool looks how it’s works

    Thanks

  2. Diego SA says:

    Hmmm…. Interesting. Gonna check it later!

  3. Ryan says:

    I’ve noticed when I use this class online it’s having issues loading multiple xml files at once. Any updates? Thank you.

  4. Roy says:

    Hi iam trying to call the XMLloader class from a flash file. Here the example:
    import flash.display.*;
    import flash.events.*;

    var xl:XMLLoader;
    var array:Array;
    xl = new XMLLoader();
    array = new Array();
    xl.addEventListener(Event.COMPLETE, loaded);
    xl.addEventListener(ProgressEvent.PROGRESS, loading);

    xl.loadXML(["http://flashden.net/feeds/user_item_comments/cg219.atom", "http://feeds2.feedburner.com/kreativeking?format=xml"], ["xml1", "xml2"], false);

    function loaded(e:Event):void {
    trace(e.target.data["xml1"]);
    }

    function loading(e:ProgressEvent):void {
    trace(e.target.ratioLoaded);
    }

    I get this error:
    xl.loadXML(["http://flashden.net/feeds/user_item_comments/cg219.atom", "http://feeds2.feedburner.com/kreativeking?format=xml"], ["xml1", "xml2"], false);
    1137: Incorrect number of arguments. Expected no more than 2.

    Is there something I am doing wrong. please let me know.

    Thanx

    • stryju says:

      yup, You’re making a mistake there:

      loadXML() method uses 2 arguments only – loadXML($url:Array, $names:Array)

      You’ve mixed it up with class constructor arguments –
      XMLLoader([$url:Array, $cache:Boolean, $names:Array, $skipErrors:Boolean])

  5. viaria says:

    i wonder what this class needs and what will return.. please post a sample how can i detect file is loaded and ready to go..

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.