XMLResource resource = (XMLResource) collection.createResource(docName, "XMLResource");
Resource resource; if(binary) resource = collection.createResource(docName, "BinaryResource"); else resource = collection.createResource(docName, "XMLResource");
	private void loadFromFile(Collection collection, File file, String docName) throws XPathException {		if(file.isFile()) {			if(docName == null)				docName = file.getName();			try {				XMLResource resource =					(XMLResource) collection.createResource(docName, "XMLResource");				resource.setContent(file);				collection.storeResource(resource);			} catch (XMLDBException e) {				throw new XPathException(getASTNode(), "Could not store file " + file.getAbsolutePath() + 						": " + e.getMessage(), e);			}		}	}