public List < Node > removeChildren ( final String name ) throws IllegalArgumentException { if ( name == null || name . trim ( ) . length ( ) == 0 ) { throw new IllegalArgumentException ( "Path must not be null or empty" ) ; } List < Node > found = get ( name ) ; for ( Node child : found ) { children . remove ( child ) ; } return found ; }
Remove all child nodes found at the given query .