Hi,
A line break (return) in your xml gives a extra node. This is called
white space nodes you have to skip these nodes.
John
--- In svg-developers@yahoogroups.com, Rerun <[EMAIL PROTECTED]> wrote:
> I added a while loop that throws me for a loop, no pun intended.
>
>
>
>
>
>
--- In svg-developers@yahoogroups.com, Sean <[EMAIL PROTECTED]> wrote:
> 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
Perfect, all I had to do is eliminate all of the line breaks and no type
3 nodes. Thanks.
jophof007 wrote:
>Hi,
>
>A line break (return) in your xml gives a extra node. This is called
>white space nodes you have to skip these nodes.
>
>John
>--- In svg-developers@yahoogroups.com, Rerun <[EMAIL
There is still one thing nagging me about parseXML. Below is a while
loop that should work, at least as far as I know, but doesn't. The
alerts display the contents of the node, thank you ctl271. If I comment
out "myGeometryToAdd.appendChild(child);", all of the child nodes in the
loop and a
For anyone interested, below is my workaround, although I'd still like
to know why my first attempt failed. Thanks..
var child = node.firstChild.firstChild;
var theID="";
var nodeArray = new Array();
var i = 0;
var myGeometryToAdd = '';
while (child != null) {
if(child.nodeType==1){
nod
appendChild is changing the owner of the child node and making it the
last child of the parent. Therefore it will have no siblings after it.
You could clone the node and append the clone (if a copy is desired)
or compute the sibling BEFORE performing the append [which is what your
workaroun
I'd be interested in seeing a cleaner approach. Thanks.
Larry Mason wrote:
>appendChild is changing the owner of the child node and making it the
>last child of the parent. Therefore it will have no siblings after it.
> You could clone the node and append the clone (if a copy is desired)
>
7 matches
Mail list logo