KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > oracle > toplink > essentials > platform > xml > XMLParser


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the "License"). You may not use this file except
5  * in compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * glassfish/bootstrap/legal/CDDLv1.0.txt or
9  * https://glassfish.dev.java.net/public/CDDLv1.0.html.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * HEADER in each file and include the License file at
15  * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
16  * add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your
18  * own identifying information: Portions Copyright [yyyy]
19  * [name of copyright owner]
20  */

21 // Copyright (c) 1998, 2005, Oracle. All rights reserved.
22
package oracle.toplink.essentials.platform.xml;
23
24 import java.io.File JavaDoc;
25 import java.io.InputStream JavaDoc;
26 import java.io.Reader JavaDoc;
27 import java.net.URL JavaDoc;
28 import javax.xml.transform.Source JavaDoc;
29 import org.w3c.dom.Document JavaDoc;
30 import org.xml.sax.EntityResolver JavaDoc;
31 import org.xml.sax.ErrorHandler JavaDoc;
32 import org.xml.sax.InputSource JavaDoc;
33
34 public interface XMLParser {
35     public static final int NONVALIDATING = 0;
36     public static final int DTD_VALIDATION = 2;
37     public static final int SCHEMA_VALIDATION = 3;
38
39     public void setNamespaceAware(boolean isNamespaceAware);
40
41     public void setWhitespacePreserving(boolean isWhitespacePreserving);
42
43     public int getValidationMode();
44
45     public void setValidationMode(int validationMode);
46
47     public EntityResolver JavaDoc getEntityResolver();
48
49     public void setEntityResolver(EntityResolver JavaDoc entityResolver);
50
51     public ErrorHandler JavaDoc getErrorHandler();
52
53     public void setErrorHandler(ErrorHandler JavaDoc errorHandler);
54
55     public void setXMLSchema(URL JavaDoc url) throws XMLPlatformException;
56
57     public void setXMLSchemas(Object JavaDoc[] schemas) throws XMLPlatformException;
58
59     public Document JavaDoc parse(InputSource JavaDoc inputSource) throws XMLPlatformException;
60
61     public Document JavaDoc parse(File JavaDoc file) throws XMLPlatformException;
62
63     public Document JavaDoc parse(InputStream JavaDoc inputStream) throws XMLPlatformException;
64
65     public Document JavaDoc parse(Reader JavaDoc reader) throws XMLPlatformException;
66
67     public Document JavaDoc parse(Source JavaDoc source) throws XMLPlatformException;
68
69     public Document JavaDoc parse(URL JavaDoc url) throws XMLPlatformException;
70 }
71
Popular Tags