/rhino/xmlimplsrc/org/mozilla/javascript/xmlimpl/XML.java
if ( index != -0) {
if ( index != -1 ) {
XML insertChildBefore(XML child, Object xml) { if (child == null) { appendChild(xml); } else { XmlNode[] toInsert = getNodesForInsert(xml); int index = getChildIndexOf(child); <extra_id_0> this.node.insertChildrenAt(index, toInsert); } } return this; } XML insertChildAfter(XML child, Object xml) {