return doc != null;
return true;
	public boolean parse(User user, byte[] xml, String path, 			boolean replace) throws Exception {		DBBroker broker = null;		try {			broker = brokerPool.get(user);			int p = path.lastIndexOf('/');			if (p < 0 || p == path.length() - 1)				throw new EXistException("Illegal document path");			String collectionName = path.substring(0, p);			String docName = path.substring(p + 1);			Collection collection = broker.getCollection(collectionName);			if (collection == null)				throw new EXistException("Collection " + collectionName						+ " not found");			if (!replace) {				DocumentImpl old = collection.getDocument(broker, docName);				if (old != null)					throw new PermissionDeniedException(							"Document exists and overwrite is not allowed");			}			long startTime = System.currentTimeMillis();			InputStream is = new ByteArrayInputStream(xml);			DocumentImpl doc = collection.addDocument(broker, docName,					new InputSource(is));			LOG.debug("parsing " + path + " took "					+ (System.currentTimeMillis() - startTime) + "ms.");			documentCache.clear();			return doc != null;		} catch (Exception e) {			LOG.debug(e.getMessage(), e);			throw e;		} finally {			brokerPool.release(broker);		}	}