protected final boolean parse(File[] files, UploadDialog upload) throws XMLDBException {
protected final boolean parse(String fileName) throws XMLDBException { fileName= fileName.replace('/', File.separatorChar).replace( '\\', File.separatorChar); File file= new File(fileName);
	protected final boolean parse(File[] files, UploadDialog upload)		throws XMLDBException {		XMLResource document;		String xml;		if (!upload.isVisible())			upload.setVisible(true);		if (current instanceof Observable) {			((Observable) current).addObserver(upload.getObserver());		}		upload.setTotalSize(calculateFileSizes(files));		long totalSize= 0;		for (int i= 0; i < files.length; i++) {			if (files[i].canRead()) {				if (files[i].isDirectory()) {					totalSize=						findRecursive(							current,							files[i],							path,							upload,							totalSize);				} else {					upload.reset();					upload.setCurrentDir(						files[i].getParentFile().getAbsolutePath());					upload.setCurrent(files[i].getName());					upload.setCurrentSize(files[i].length());					try {						document=							(XMLResource) current.createResource(								files[i].getName(),								"XMLResource");						document.setContent(files[i]);						current.storeResource(document);						totalSize += files[i].length();						upload.setStoredSize(totalSize);					} catch (XMLDBException e) {						upload.showMessage(							"could not parse file "								+ files[i].getAbsolutePath()								+ ": "								+ e.getMessage());					}				}			}		}		if(current instanceof Observable)			((Observable)current).deleteObservers();		upload.setVisible(false);		return true;	}