question: public void insertChild ( Node [ ] nodes , int index ) { for ( Node node : nodes ) { node . detachFromParent ( ) ; node . parentNode = this ; try { initChildNodes ( node ) ; childNodes . add ( index , node ) ; index ++ ; } catch ( IndexOutOfBoundsException ignore ) { throw new LagartoDOMException ( "Invalid node index: " + index ) ; } } reindexChildren ( ) ; }
target:  Inserts several nodes at ones. Reindex is done onl once, after all children are added.