01: package com.jclark.xml.parse;
02:
03: import java.io.IOException;
04: import java.util.Locale;
05: import com.jclark.xml.parse.base.Application;
06:
07: /**
08: * A parser for XML documents.
09: * @version $Revision: 1.1 $ $Date: 1998/05/08 06:37:11 $
10: */
11: public class DocumentParser {
12: /**
13: * Parses an XML document.
14: *
15: * @param entity the document entity of the XML document; the InputStream
16: * of the document entity will be closed after parsing
17: * @param entityManager the EntityManager to be used to access external
18: * entities referenced in the document
19: * @param application the Application which will receive information
20: * about the XML document
21: * @param locale the Locale to be used for error messages
22: *
23: * @exception NotWellFormedException if the document is not well-formed
24: * @exception IOException if an IO error occurs
25: * @exception ApplicationException if any of the <code>Application</code>
26: * methods throw an Exception
27: */
28: public static void parse(OpenEntity entity,
29: EntityManager entityManager, Application application,
30: Locale locale) throws ApplicationException, IOException {
31: new EntityParser(entity, entityManager, application, locale,
32: null).parseDocumentEntity();
33: }
34: }
|