protected void moveChildren ( Element parent , Element destination ) { NodeList children = parent . getChildNodes ( ) ; while ( children . getLength ( ) > 0 ) { destination . appendChild ( parent . removeChild ( parent . getFirstChild ( ) ) ) ; } }
Moves all child elements of the parent into destination element .