public static InputSource getResourceAsSAXInputSource ( Class < ? > requestingClass , String resource ) throws ResourceMissingException , IOException { URL url = getResourceAsURL ( requestingClass , resource ) ; InputSource source = new InputSource ( url . openStream ( ) ) ; source . setPublicId ( url . toExternalForm ( ) ) ; return source ; }
Returns the requested resource as a SAX input source .