loadFromURI(collection, uri, docName);
loadFromURI(collection, uri, docName, binary);
	public Sequence evalWithCollection(Collection collection, Sequence args[],		Sequence contextSequence)		throws XPathException {		String docName = args[1].getLength() == 0 ? null : args[1].getStringValue();		if(docName != null && docName.length() == 0)			docName = null;		Item item =			args[2].itemAt(0);		try {			if(Type.subTypeOf(item.getType(), Type.JAVA_OBJECT)) {				Object obj = ((JavaObjectValue)item).getObject();				if(!(obj instanceof File))					throw new XPathException(getASTNode(), "Passed java object should be a File");				loadFromFile(collection, (File)obj, docName);			}else if(Type.subTypeOf(item.getType(), Type.ANY_URI)) {				try {					URI uri = new URI(item.getStringValue());					loadFromURI(collection, uri, docName);				} catch (URISyntaxException e) {					throw new XPathException(getASTNode(), "Invalid URI: " + item.getStringValue(), e);				}			} else {				XMLResource resource =					(XMLResource) collection.createResource(docName, "XMLResource");				if(Type.subTypeOf(item.getType(), Type.STRING)) {					resource.setContent(item.getStringValue());				} else if(Type.subTypeOf(item.getType(), Type.NODE)) {					ContentHandler handler = resource.setContentAsSAX();					handler.startDocument();					item.toSAX(context.getBroker(), handler);					handler.endDocument();				} else					throw new XPathException("Data should be either a node or a string");				collection.storeResource(resource);				context.getRootExpression().resetState();			}		} catch (XMLDBException e) {			throw new XPathException(				"XMLDB reported an exception while storing document",				e);		} catch (SAXException e) {			throw new XPathException(				"SAX reported an exception while storing document",				e);		}		return Sequence.EMPTY_SEQUENCE;	}