protected final Object unmarshalSaxReader(XMLReader xmlReader, InputSource inputSource) throws XmlMappingException, IOException { XmlSaxHandler saxHandler = XmlObject.Factory.newXmlSaxHandler(getXmlOptions()); xmlReader.setContentHandler(saxHandler.getContentHandler()); try { xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler", saxHandler.getLexicalHandler()); } catch (SAXNotRecognizedException e) { // ignore } catch (SAXNotSupportedException e) { // ignore } try { xmlReader.parse(inputSource); XmlObject object = saxHandler.getObject(); validate(object); return object; } catch (SAXException ex) { throw convertXmlBeansException(ex, false); } catch (XmlException ex) { throw convertXmlBeansException(ex, false); } }
@Override protected Object unmarshalSaxReader(XMLReader xmlReader, InputSource inputSource) throws XmlMappingException, IOException { XmlSaxHandler saxHandler = XmlObject.Factory.newXmlSaxHandler(getXmlOptions()); xmlReader.setContentHandler(saxHandler.getContentHandler()); try { xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler", saxHandler.getLexicalHandler()); } catch (SAXNotRecognizedException ex) { // ignore } catch (SAXNotSupportedException ex) { // ignore } try { xmlReader.parse(inputSource); XmlObject object = saxHandler.getObject(); validate(object); return object; } catch (SAXException ex) { throw convertXmlBeansException(ex, false); } catch (XmlException ex) { throw convertXmlBeansException(ex, false); } }