Code example for SAXSource

0
        }); 
 
        XMLFilter xmlFilter = new NoSourceAndNamespaceFilter(parser.getXMLReader());
        xmlFilter.setContentHandler(unmarshaller.getUnmarshallerHandler());
 
        SAXSource source = new SAXSource(xmlFilter, inputSource);
 
        return (Features)unmarshaller.unmarshal(source);
         
        } catch (ParserConfigurationException e) {
            throw new RuntimeException(e);
        } catch (JAXBException e) {
            throw new RuntimeException(e);
        } catch (SAXException e) {
            throw new RuntimeException(e);
        } 
    } 
 
    /** 
     * Provides an empty inputsource for the entity resolver. 
Experience pair programming with AI  Get Codota for Java