public static boolean isVersion10ResourceAdapter(InputStream xmlStream) {
        try {
            SAXParserFactory factory = SAXParserFactory.newInstance();
            factory.setNamespaceAware(true);
            factory.setValidating(false);
            XMLReader parser = factory.newSAXParser().getXMLReader();
            SAXVersionHandler handler = new SAXVersionHandler();
            parser.setEntityResolver(resolver);
            parser.setContentHandler(handler);
            parser.parse(new InputSource(xmlStream));
            return handler.isVersion10ResourceAdapter;
        } catch (SAXException ex) {
            // Check for FFDC
        } catch (ParserConfigurationException e) {
            // Check for FFDC
        } catch (IOException e) {
            // Check for FFDC
        }
        return false;
    }
public static boolean isVersion10ResourceAdapter ( InputStream xmlStream ) { try { SAXParserFactory factory = SAXParserFactory . newInstance ( ) ; factory . setNamespaceAware ( true ) ; factory . setValidating ( false ) ; XMLReader parser = factory . newSAXParser ( ) . getXMLReader ( ) ; SAXVersionHandler handler = new SAXVersionHandler ( ) ; parser . setEntityResolver ( resolver ) ; parser . setContentHandler ( handler ) ; parser . parse ( new InputSource ( xmlStream ) ) ; return handler . isVersion10ResourceAdapter ; } catch ( SAXException ex ) { } catch ( ParserConfigurationException e ) { } catch ( IOException e ) { } return false ; }
This method is used to inspect the ra.xml and check if its a 1.0 RA. This is called only
if we fail parsing the ra.xml using JAXB for 1.5/1.6

@param xmlStream The ra.xml file
@return whether the resource adapter is a 1.0 resource adapter