39 import org.xml.sax.InputSource;
40 import org.xml.sax.SAXException;
41
42 /**
43 * Defines the API to obtain DOM Document instances from an XML
44 * document. Using this class, an application programmer can obtain a
45 * {@link Document} from XML.<p>
46 *
47 * An instance of this class can be obtained from the
48 * {@link DocumentBuilderFactory#newDocumentBuilder()} method. Once
49 * an instance of this class is obtained, XML can be parsed from a
50 * variety of input sources. These input sources are InputStreams,
51 * Files, URLs, and SAX InputSources.<p>
52 *
53 * Note that this class reuses several classes from the SAX API. This
54 * does not require that the implementor of the underlying DOM
55 * implementation use a SAX parser to parse XML document into a
56 * <code>Document</code>. It merely requires that the implementation
57 * communicate with the application using these existing APIs.
58 *
59 * @author <a href="mailto:Jeff.Suttor@Sun.com">Jeff Suttor</a>
60 * @since 1.4
61 */
62
63 public abstract class DocumentBuilder {
64
65
66 /** Protected constructor */
67 protected DocumentBuilder () {
68 }
69
70 /**
71 * <p>Reset this <code>DocumentBuilder</code> to its original configuration.</p>
72 *
73 * <p><code>DocumentBuilder</code> is reset to the same state as when it was created with
74 * {@link DocumentBuilderFactory#newDocumentBuilder()}.
75 * <code>reset()</code> is designed to allow the reuse of existing <code>DocumentBuilder</code>s
76 * thus saving resources associated with the creation of new <code>DocumentBuilder</code>s.</p>
77 *
78 * <p>The reset <code>DocumentBuilder</code> is not guaranteed to have the same {@link EntityResolver} or {@link ErrorHandler}
79 * <code>Object</code>s, e.g. {@link Object#equals(Object obj)}. It is guaranteed to have a functionally equal
|
39 import org.xml.sax.InputSource;
40 import org.xml.sax.SAXException;
41
42 /**
43 * Defines the API to obtain DOM Document instances from an XML
44 * document. Using this class, an application programmer can obtain a
45 * {@link Document} from XML.<p>
46 *
47 * An instance of this class can be obtained from the
48 * {@link DocumentBuilderFactory#newDocumentBuilder()} method. Once
49 * an instance of this class is obtained, XML can be parsed from a
50 * variety of input sources. These input sources are InputStreams,
51 * Files, URLs, and SAX InputSources.<p>
52 *
53 * Note that this class reuses several classes from the SAX API. This
54 * does not require that the implementor of the underlying DOM
55 * implementation use a SAX parser to parse XML document into a
56 * <code>Document</code>. It merely requires that the implementation
57 * communicate with the application using these existing APIs.
58 *
59 * @author Jeff Suttor
60 * @since 1.4
61 */
62
63 public abstract class DocumentBuilder {
64
65
66 /** Protected constructor */
67 protected DocumentBuilder () {
68 }
69
70 /**
71 * <p>Reset this <code>DocumentBuilder</code> to its original configuration.</p>
72 *
73 * <p><code>DocumentBuilder</code> is reset to the same state as when it was created with
74 * {@link DocumentBuilderFactory#newDocumentBuilder()}.
75 * <code>reset()</code> is designed to allow the reuse of existing <code>DocumentBuilder</code>s
76 * thus saving resources associated with the creation of new <code>DocumentBuilder</code>s.</p>
77 *
78 * <p>The reset <code>DocumentBuilder</code> is not guaranteed to have the same {@link EntityResolver} or {@link ErrorHandler}
79 * <code>Object</code>s, e.g. {@link Object#equals(Object obj)}. It is guaranteed to have a functionally equal
|