# Do we have any XML + Actionscript 2 experts on right now?

**URL:** <https://forum.kirupa.com/t/do-we-have-any-xml-actionscript-2-experts-on-right-now/278111>\
**Category:** Uncategorized\
**Created:** [December 22, 2008, 6:02pm UTC](https://forum.kirupa.com/t/do-we-have-any-xml-actionscript-2-experts-on-right-now/278111 "2008-12-22T18:02:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cricex](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@cricex](https://forum.kirupa.com/u/cricex)\
**Post date:** [December 22, 2008, 6:02pm UTC](https://forum.kirupa.com/t/do-we-have-any-xml-actionscript-2-experts-on-right-now/278111/1 "2008-12-22T18:02:45Z")

</div>

```auto

  
        var library_obj:Object = new Object(); // library object
        library_obj.numNodes = rootNode.childNodes.length;

                //trace(library_obj.numNodes);
        
        for(var n:Number = 1; n < library_obj.numNodes; n++){
        
            
            trace(rootNode.childNodes[n].nodeName);
            
            library_obj.subNodes = rootNode.childNodes[n].childNodes;
        
        
            for (var i:Number = 0; i < library_obj.subNodes.length; i++) {
                library_obj.library[n] = new Object();
                library_obj.library[n].image*.path = rootNode.childNodes[n].childNodes*.attributes.itemPath;

                // THIS WORKS 
                trace(rootNode.childNodes[n].childNodes*.attributes.itemPath);
                trace(library_obj.subNodes*.attributes.itemPath);
                
                
                // THIS DOES NOT WORK
                trace(library_obj.library[n].image*.path);

            } buildLibrary();
            
    
        }

```

I’ve marked what does and does not work in the code… they should ALL equal the same thing at that point. I am not too familiar w/ AS2 so I could very well be breaking a rule or doing it wrong when I am setting the value of library\_obj.library[n].image\*.path… but I just don’t know…
