/** * This provides an <code>EventReader</code> that will read from * the specified reader. When reading from a reader the character * encoding should be the same as the source XML document. * * @param source this is the reader to read the document with * * @return this is used to return the event reader implementation */ public EventReader provide(Reader source) throws Exception { return provide(new InputSource(source)); }
/** * This is used to acquire the <code>Provider</code> to be used * to process XML documents. The provider returned is determined * by scanning the classpath for StAX dependencies, if they are * available then the provider used is StAX otherwise it is DOM. * Scanning the classpath in this manner ensures the most suitable * parser is used for the host platform. * * @return this returns the provider that has been instantiate */ public static Provider getInstance() { try { try { return new StreamProvider(); } catch(Throwable e) { return new PullProvider(); } } catch(Throwable e) { return new DocumentProvider(); } } }
/** * This is used to acquire the <code>Provider</code> to be used * to process XML documents. The provider returned is determined * by scanning the classpath for StAX dependencies, if they are * available then the provider used is StAX otherwise it is DOM. * Scanning the classpath in this manner ensures the most suitable * parser is used for the host platform. * * @return this returns the provider that has been instantiate */ public static Provider getInstance() { try { try { return new StreamProvider(); } catch(Throwable e) { return new PullProvider(); } } catch(Throwable e) { return new DocumentProvider(); } } }
/** * This provides an <code>EventReader</code> that will read from * the specified reader. When reading from a reader the character * encoding should be the same as the source XML document. * * @param source this is the reader to read the document with * * @return this is used to return the event reader implementation */ public EventReader provide(Reader source) throws Exception { return provide(new InputSource(source)); }
/** * This is used to acquire the <code>Provider</code> to be used * to process XML documents. The provider returned is determined * by scanning the classpath for StAX dependencies, if they are * available then the provider used is StAX otherwise it is DOM. * Scanning the classpath in this manner ensures the most suitable * parser is used for the host platform. * * @return this returns the provider that has been instantiate */ public static Provider getInstance() { try { try { return new StreamProvider(); } catch(Throwable e) { return new PullProvider(); } } catch(Throwable e) { return new DocumentProvider(); } } }
/** * This provides an <code>EventReader</code> that will read from * the specified reader. When reading from a reader the character * encoding should be the same as the source XML document. * * @param source this is the reader to read the document with * * @return this is used to return the event reader implementation */ public EventReader provide(Reader source) throws Exception { return provide(new InputSource(source)); }
/** * This provides an <code>EventReader</code> that will read from * the specified input stream. When reading from an input stream * the character encoding should be taken from the XML prolog or * it should default to the UTF-8 character encoding. * * @param source this is the stream to read the document with * * @return this is used to return the event reader implementation */ public EventReader provide(InputStream source) throws Exception { return provide(new InputSource(source)); }
/** * This provides an <code>EventReader</code> that will read from * the specified input stream. When reading from an input stream * the character encoding should be taken from the XML prolog or * it should default to the UTF-8 character encoding. * * @param source this is the stream to read the document with * * @return this is used to return the event reader implementation */ public EventReader provide(InputStream source) throws Exception { return provide(new InputSource(source)); }
/** * This provides an <code>EventReader</code> that will read from * the specified input stream. When reading from an input stream * the character encoding should be taken from the XML prolog or * it should default to the UTF-8 character encoding. * * @param source this is the stream to read the document with * * @return this is used to return the event reader implementation */ public EventReader provide(InputStream source) throws Exception { return provide(new InputSource(source)); }