question: public void toFile ( final File file ) { final List < String > sortedPaths = makeItemPathList ( ) ; Collections . sort ( sortedPaths , ServerPath . TOP_DOWN_COMPARATOR ) ; final Document document = DOMCreateUtils . newDocument ( ROOT_ELEMENT_NAME ) ; final Element root = document . getDocumentElement ( ) ; final Element element = DOMUtils . appendChild ( root , FOLDER_PATHS_ELEMENT_NAME ) ; for ( final Iterator < String > it = sortedPaths . iterator ( ) ; it . hasNext ( ) ; ) { final String path = it . next ( ) ; DOMUtils . appendChildWithText ( element , PATH_ELEMENT_NAME , path ) ; } DOMSerializeUtils . serializeToFile ( document , file , DOMSerializeUtils . ENCODING_UTF8 , DOMSerializeUtils . INDENT ) ; }
target:  Serializes this SelectionSet out to a file.