XMLReader reader = XMLReaderFactory.createXMLReader();
reader.setContentHandler(filter);
reader.setProperty("http://xml.org/sax/properties/lexical-handler", filter);
try {
InputStream is = bitstream.retrieve();
reader.parse(new InputSource(is));
} catch (AuthorizeException ae) {
// just ignore the authorize exception and continue on with
//out parsing the xml document.
}