*/
public void getContentAsSAX(ContentHandler handler) throws XMLDBException {
// TODO: should probably use JAXP
try {
if (bytes != null) {
SAXEventGenerator events = new SAXEventGenerator(symbols, bytes);
events.setFeature(SAX_NAMESPACES_FEATURE, hasSaxNamespaces);
events.setFeature(SAX_NAMESPACE_PREFIXES_FEATURE, hasSaxNamespacesPrefixes);
events.setContentHandler(handler);
if (handler instanceof ErrorHandler) {
events.setErrorHandler((ErrorHandler) handler);
}
events.start();
} else if (content != null) {
SAXParser sp = saxFactory.newSAXParser();
XMLReader xr = sp.getXMLReader();
xr.setFeature(SAX_NAMESPACES_FEATURE, hasSaxNamespaces);