Map properties = new TreeMap(); properties.put(Serializer.ENCODING, encoding); properties.put( Serializer.PRETTY_PRINT, Boolean.toString(prettyPrint));
serializer.setProperty(OutputKeys.ENCODING, encoding); serializer.setProperty( OutputKeys.INDENT, prettyPrint ? "yes" : "no");
	public String retrieve(		User user,		String docName,		String s_id,		boolean prettyPrint,		String encoding)		throws Exception {		DBBroker broker = brokerPool.get(user);		try {			long id = Long.parseLong(s_id);			DocumentImpl doc;			if (!documentCache.containsKey(docName)) {				doc = (DocumentImpl) broker.getDocument(docName);				documentCache.put(docName, doc);			} else				doc = (DocumentImpl) documentCache.get(docName);			NodeProxy node = new NodeProxy(doc, id);			Serializer serializer = broker.getSerializer();			Map properties = new TreeMap();			properties.put(Serializer.ENCODING, encoding);			properties.put(				Serializer.PRETTY_PRINT,				Boolean.toString(prettyPrint));			return serializer.serialize(node);		} finally {			brokerPool.release(broker);		}	}