A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: xmlobj.firstChild.childNodes[3] vs xmlobj.chapter.page

Threaded View

  1. #1

    xmlobj.firstChild.childNodes[3] vs xmlobj.chapter.page

    [EDIT] I got it to work. See following posts, as this one contains non-working AS [/EDIT]
    I'm trying to make it so taht I can use tag names rather than all that 'firstChild' & 'childNodes' junk. Here's what i have:

    function tagNotation(xmltarget){
    //recusion function
    function tagChildren(node){
    for(var i=0 ; i<node.childNodes.length ; i++){//loop through current recursion node's children
    node.childNodes[i].addProperty(node.childNodes[i].nodeName, function(){ return node.childNodes[i] }, null);
    if(node.childNodes[i].hasChildNodes){//if current recursion node's child has children

    It loops through all tags nicely. However, see where I'm trying to add a property? It doesn't seem to work. Anybody want to help me out with this? The thought was to simply add a property to every node which references it's children by name.
    Last edited by >flashl!ght<; 12-29-2004 at 02:34 PM.
    All the normal names were taken.
    Ron Paul was right.

Posting Permissions

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

Click Here to Expand Forum to Full Width

HTML5 Development Center