1 /*
2 * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 // DefaultHandler.java - default implementation of the core handlers.
27 // http://www.saxproject.org
28 // Written by David Megginson
29 // NO WARRANTY! This class is in the public domain.
30 // $Id: DefaultHandler.java,v 1.3 2006/04/13 02:06:32 jeffsuttor Exp $
31
32 package org.xml.sax.helpers;
33
34 import java.io.IOException;
35
36 import org.xml.sax.InputSource;
37 import org.xml.sax.Locator;
38 import org.xml.sax.Attributes;
39 import org.xml.sax.EntityResolver;
40 import org.xml.sax.DTDHandler;
41 import org.xml.sax.ContentHandler;
42 import org.xml.sax.ErrorHandler;
43 import org.xml.sax.SAXException;
44 import org.xml.sax.SAXParseException;
45
46
47 /**
48 * Default base class for SAX2 event handlers.
49 *
50 * <blockquote>
51 * <em>This module, both source code and documentation, is in the
52 * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
53 * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
54 * for further information.
55 * </blockquote>
56 *
57 * <p>This class is available as a convenience base class for SAX2
58 * applications: it provides default implementations for all of the
59 * callbacks in the four core SAX2 handler classes:</p>
60 *
61 * <ul>
62 * <li>{@link org.xml.sax.EntityResolver EntityResolver}</li>
63 * <li>{@link org.xml.sax.DTDHandler DTDHandler}</li>
64 * <li>{@link org.xml.sax.ContentHandler ContentHandler}</li>
65 * <li>{@link org.xml.sax.ErrorHandler ErrorHandler}</li>
66 * </ul>
67 *
68 * <p>Application writers can extend this class when they need to
69 * implement only part of an interface; parser writers can
70 * instantiate this class to provide default handlers when the
71 * application has not supplied its own.</p>
72 *
73 * <p>This class replaces the deprecated SAX1
74 * {@link org.xml.sax.HandlerBase HandlerBase} class.</p>
75 *
|
1 /*
2 * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package org.xml.sax.helpers;
27
28 import java.io.IOException;
29
30 import org.xml.sax.InputSource;
31 import org.xml.sax.Locator;
32 import org.xml.sax.Attributes;
33 import org.xml.sax.EntityResolver;
34 import org.xml.sax.DTDHandler;
35 import org.xml.sax.ContentHandler;
36 import org.xml.sax.ErrorHandler;
37 import org.xml.sax.SAXException;
38 import org.xml.sax.SAXParseException;
39
40
41 /**
42 * Default base class for SAX2 event handlers.
43 *
44 * <p>This class is available as a convenience base class for SAX2
45 * applications: it provides default implementations for all of the
46 * callbacks in the four core SAX2 handler classes:</p>
47 *
48 * <ul>
49 * <li>{@link org.xml.sax.EntityResolver EntityResolver}</li>
50 * <li>{@link org.xml.sax.DTDHandler DTDHandler}</li>
51 * <li>{@link org.xml.sax.ContentHandler ContentHandler}</li>
52 * <li>{@link org.xml.sax.ErrorHandler ErrorHandler}</li>
53 * </ul>
54 *
55 * <p>Application writers can extend this class when they need to
56 * implement only part of an interface; parser writers can
57 * instantiate this class to provide default handlers when the
58 * application has not supplied its own.</p>
59 *
60 * <p>This class replaces the deprecated SAX1
61 * {@link org.xml.sax.HandlerBase HandlerBase} class.</p>
62 *
|