> I think what is fundamentally wrong is your comprehansion of DOM. What > you're trying to do: > > > document.insertBefore(keyNode,keyNode); > > makes absolutely no sense to me, and probably to DOM. What does it mean > "to insert a node before itself"???
Yes - you'd never use the same node as arguments to insertBefore. If I understand the API you would use insertBefore like this: <person> <name>Brent Johnson</name> <occupation>Web Developer</occupation> </person> if "newChild" is a reference to a node with child nodes like "<id>4</id>" and refChild is a reference to the "<name>" node then a call to: document.insertBefore(newChild, refChild); Would have a result of something like: <person> <id>4</id> <name>Brent Johnson</name> <occupation>Web Developer</occupation> </person> I've never used it.. but that seems to be what the DOM API says. Per the API: "Inserts the node newChild before the existing child node refChild. If refChild is null, insert newChild at the end of the list of children. " Hope that helps... and I agree that this isnt a Cocoon problem and you should probably read the DOM Java API a little closer before posting a Java Exception to this mailing list. Just my 2 cents. - Brent --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
