Re: Why not Node.insertAfter()?

> So I guess I should interpret getNextSibling() as the next node at the
> same level as the refChild?

A sibling is a node with the same parent. If you have the document <a><b/>
<c/></a>, b and c both have a as their parent. b is c's previous sibling,
and c is b's next sibling.

If you then issue the operation a.insertbefore(d,null), or
a.appendChild(d), d will become a's last child: <a><b/><c/><d/></a>.

______________________________________
Joe Kesselman  / IBM Research

Received on Wednesday, 8 March 2000 13:56:58 UTC