So getElementById is of no help.  Below is what I have, but it doesn't 
behave how I think it should.  I've stared the lines of code that are 
throwing me off.  Also, how do I get "alert(child);" to show the 
contents of the node, as opposed to just telling me that it is an 
"SVGGElement"? This would go a long way to figuring out what is going on.

var node = parseXML(data.content, document);
var child = node.firstChild.firstChild;
var theID="";
var IdArray = new Array();
var i = 0;
while (child != null) {
        theID = child.getAttributeNS(null,"id");
        //myGeometryToAdd = document.getElementById(theID);

       //This line causes the entire loop to quit after the first 
iteration. It apends the the first "child" though.
       *** //myGeometryToAdd.appendChild(child);

       //I create this to try a different approach.
       *** IdArray[i] = theID;

        ***alert(child);  //Tells me nothing I want to know.  Is there a 
way to display its contents?
        child = child.nextSibling;
        i=i+1;            
}
             
 var child2 = node.firstChild.firstChild;
 for (x=0; x<i; x++) {
       theID = IdArray[x];
       myGeometryToAdd = document.getElementById(IdArray[x]);
      
       // The next line is odd to me, it works.  It appends all the 
siblings, but not sure why.
       //Shouldn't it just append the node.firstChild.firstChild 
multiple times?
       //Is it appending all the data to all the siblings?
       ***//myGeometryToAdd.appendChild(node.firstChild.firstChild);

       //Doesn't work after appending the first child2.
       //Claims the nextSibling is null.
       ***//myGeometryToAdd.appendChild(child2);
       ***//child2=child2.nextSibling
 }



-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my 
membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to