public void renameNodesInTree ( String oldName , String newName ) { List < Node > nodes = getNodesFromTreeByName ( oldName ) ; Iterator i = nodes . iterator ( ) ; while ( i . hasNext ( ) ) { Node n = ( Node ) i . next ( ) ; n . setName ( newName ) ; } }
Renames all subnodes with a certain name