question: private static void appendPathElements ( Document doc , String elementType , Element libraryElement , String [ ] paths ) { if ( paths . length > 0 ) { Element child = doc . createElement ( elementType ) ; libraryElement . appendChild ( child ) ; for ( int i = 0 ; i < paths . length ; i ++ ) { String path = paths [ i ] ; Element entry = doc . createElement ( "entry" ) ; child . appendChild ( entry ) ; entry . setAttribute ( "path" , path ) ; } } }
target:  Appends path elements to the given library element, rooted by an element of the given type.