else if(proxy != null) return document.getNode(proxy);
	public Node getContentAsDOM() throws XMLDBException {		DBBroker broker = null;		try {			broker = brokerPool.get();			if (document == null)				getDocument(broker);			if (!document.getPermissions().validate(user, Permission.READ))				throw new XMLDBException(					ErrorCodes.PERMISSION_DENIED,					"permission denied to read resource");			if (id < 0)				return document.getDocumentElement();			else				return document.getNode(id);		} catch (EXistException e) {			throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(), e);		} finally {			brokerPool.release(broker);		}	}