To answer the other question:
>What will be happen if insertBefore() is called like below?
> myNode.insertNode(myAttribute, prevNode);
As I read it, that should cause the DOM to throw a HIERARCHY_REQUEST_ERR
since Attribute is not an acceptable child of any node. See the
documentation for Node, which includes a table indicating what parent/child
relationships are legal.
______________________________________
Joe Kesselman / IBM Research
Unless stated otherwise, all opinions are solely those of the author.