1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
package com.jclark.xml.parse.io;
import java.io.IOException;
import com.jclark.xml.parse.*;
/**
*
* @version $Revision: 1.1 $ $Date: 1998/05/08 06:38:35 $
*/
public class ParserImpl extends ParserBase implements Parser {
private Application application = new ApplicationImpl();
public void setApplication(Application application) {
if (application == null)
throw new NullPointerException();
this.application = application;
}
/**
* Parses an XML document.
* If no <code>EntityManager</code> has been specified with
* <code>setEntityManager</code>, then <code>EntityManagerImpl</code>
* will be used.
*
* @param entity the document entity of the XML document
* @exception NotWellFormedException if the document is not well-formed
* @exception IOException if an IO error occurs
* @see EntityManagerImpl
*/
public void parseDocument(OpenEntity entity) throws IOException {
try {
DocumentParser.parse(entity, entityManager, application, locale);
}
catch (ApplicationException e) {
throw (IOException)e.getException();
}
}
}
|