Resource res = new LocalXMLResource(user, brokerPool, collection, "", -1);
Resource res = new LocalXMLResource(user, brokerPool, collection, "");
	public Resource getMembersAsResource() throws XMLDBException {		SAXSerializer handler = SAXSerializerPool.getInstance().borrowSAXSerializer();		handler.setOutputProperties(outputProperties);		StringWriter writer = new StringWriter();		handler.setWriter(writer);				DBBroker broker = null;		try {			broker = brokerPool.get(user);			// configure the serializer			Serializer serializer = broker.getSerializer();			serializer.reset();			collection.properties.setProperty(Serializer.GENERATE_DOC_EVENTS, "false");			serializer.setProperties(outputProperties);			serializer.setUser(user);			serializer.setSAXHandlers(handler, handler);			//	serialize results			handler.startDocument();			handler.startPrefixMapping("exist", Serializer.EXIST_NS);			AttributesImpl attribs = new AttributesImpl();			attribs.addAttribute(				"",				"hitCount",				"hitCount",				"CDATA",				Integer.toString(resources.size()));			handler.startElement(						Serializer.EXIST_NS,						"result",						"exist:result",						attribs);			Item current;			char[] value;			for(Iterator i = resources.iterator(); i.hasNext(); ) {				current = (Item)i.next();				if(Type.subTypeOf(current.getType(), Type.NODE)) {					((NodeValue)current).toSAX(broker, handler);				} else {					value = current.toString().toCharArray();					handler.characters(value, 0, value.length);				}			}			handler.endElement(Serializer.EXIST_NS, "result", "exist:result");			handler.endPrefixMapping("exist");			handler.endDocument();		} catch (EXistException e) {			throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, "serialization error", e);		} catch (SAXException e) {			throw new XMLDBException(ErrorCodes.UNKNOWN_ERROR, "serialization error", e);		} finally {			brokerPool.release(broker);		}		Resource res = new LocalXMLResource(user, brokerPool, collection, "", -1);		res.setContent(writer.toString());		return res;	}