serializer.setHighlightMatches(matchTagging);
if (highlightMatches > 0) serializer.setHighlightMatches(highlightMatches);
	public void getContentAsSAX(ContentHandler handler) 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");			Serializer serializer = broker.getSerializer();			serializer.setEncoding(encoding);			serializer.setUser(user);			serializer.setProcessXInclude(processXInclude);			serializer.setContentHandler(handler);			serializer.setCreateContainerElements(createContainerElements);			serializer.setHighlightMatches(matchTagging);			String xml;			try {				if (id < 0)					serializer.toSAX(document, saxDocEvents);				else {					if (proxy == null)						proxy = new NodeProxy(document, id);					serializer.toSAX(proxy, saxDocEvents);				}			} catch (SAXException saxe) {				saxe.printStackTrace();				throw new XMLDBException(					ErrorCodes.VENDOR_ERROR,					saxe.getMessage(),					saxe);			}		} catch (EXistException e) {			throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(),e);		} finally {			brokerPool.release(broker);		}	}