Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash XML help?

Status
Not open for further replies.

frozenpeas

Technical User
Sep 13, 2001
893
CA
I need to make my way to the node "link" which is the child node of "links". No matter what I do, I can't find it. Any ideas?

Once I find "links" I trace hasChildNodes and that returns "true"... but that's as far as it will go. I can't actually read the child node.

Code:
function loadLinks () {
    for (i=0; i<=this.childNodes.length; i++) {
        if (this.childNodes[i].nodeName.toLowerCase() == &quot;links&quot;) {
            trace (this.childNodes[i].hasChildNodes());
        }
    }
}

So that traces &quot;true&quot;...

I want my function to be:
Code:
function loadLinks () {
    for (i=0; i<=this.childNodes.length; i++) {
        if (this.childNodes[i].nodeName.toLowerCase() == &quot;link&quot;) {
            do what I want;
        }
    }
}

... but I can't get there. Oh my...
 
By the way, I'm including Branden Hall's xmlnitro.as in my AS and am ignoring white space.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top