private Element findRootFolderElement ( Document dom ) { NodeList list = dom . getElementsByTagNameNS ( "*" , "folder" ) ; final String localRootId = getRootId ( ) ; // cache it also in this method for ( int i = 0 ; i < list . getLength ( ) ; i ++ ) { Element e = ( Element ) list . item ( i ) ; if ( e . getAttribute ( "id" ) . equals ( localRootId ) ) { return e ; } } throw new CStorageException ( "Could not find root folder with id=" + localRootId ) ; }
Gets the element corresponding to the root folder in the DOM .