1 /* |
1 /* |
2 * Copyright (c) 2000, 2005, Oracle and/or its affiliates. All rights reserved. |
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. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
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 |
22 * or visit www.oracle.com if you need additional information or have any |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 // XMLReader.java - read an XML document. |
|
27 // http://www.saxproject.org |
|
28 // Written by David Megginson |
|
29 // NO WARRANTY! This class is in the Public Domain. |
|
30 // $Id: XMLReader.java,v 1.3 2004/11/03 22:55:32 jsuttor Exp $ |
|
31 |
|
32 package org.xml.sax; |
26 package org.xml.sax; |
33 |
27 |
34 import java.io.IOException; |
28 import java.io.IOException; |
35 |
29 |
36 |
30 |
37 /** |
31 /** |
38 * Interface for reading an XML document using callbacks. |
32 * Interface for reading an XML document using callbacks. |
39 * |
33 * |
40 * <blockquote> |
|
41 * <em>This module, both source code and documentation, is in the |
|
42 * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em> |
|
43 * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a> |
|
44 * for further information. |
|
45 * </blockquote> |
|
46 * |
|
47 * <p><strong>Note:</strong> despite its name, this interface does |
|
48 * <em>not</em> extend the standard Java {@link java.io.Reader Reader} |
|
49 * interface, because reading XML is a fundamentally different activity |
|
50 * than reading character data.</p> |
|
51 * |
34 * |
52 * <p>XMLReader is the interface that an XML parser's SAX2 driver must |
35 * <p>XMLReader is the interface that an XML parser's SAX2 driver must |
53 * implement. This interface allows an application to set and |
36 * implement. This interface allows an application to set and |
54 * query features and properties in the parser, to register |
37 * query features and properties in the parser, to register |
55 * event handlers for document processing, and to initiate |
38 * event handlers for document processing, and to initiate |
72 * higher-level XML standards.</li> |
55 * higher-level XML standards.</li> |
73 * </ol> |
56 * </ol> |
74 * |
57 * |
75 * <p>There are adapters available to convert a SAX1 Parser to |
58 * <p>There are adapters available to convert a SAX1 Parser to |
76 * a SAX2 XMLReader and vice-versa.</p> |
59 * a SAX2 XMLReader and vice-versa.</p> |
|
60 * |
|
61 * @apiNote Despite its name, this interface does |
|
62 * <em>not</em> extend the standard Java {@link java.io.Reader Reader} |
|
63 * interface, because reading XML is a fundamentally different activity |
|
64 * than reading character data. |
77 * |
65 * |
78 * @since 1.4, SAX 2.0 |
66 * @since 1.4, SAX 2.0 |
79 * @author David Megginson |
67 * @author David Megginson |
80 * @see org.xml.sax.XMLFilter |
68 * @see org.xml.sax.XMLFilter |
81 * @see org.xml.sax.helpers.ParserAdapter |
69 * @see org.xml.sax.helpers.ParserAdapter |