{
parser = saxFactory.newSAXParser();
}
catch(Exception e)
{
throw new JBossXBException("Failed to create a new SAX parser", e);
}
XMLReader reader = null;
try
{
reader = parser.getXMLReader();
}
catch(SAXException e)
{
throw new JBossXBException("Failed to get parser's XMLReader", e);
}
reader.setContentHandler(new DelegatingContentHandler());
reader.setErrorHandler(new MetaDataErrorHandler());
reader.setEntityResolver(new JBossEntityResolver());