KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xerces > jaxp > validation > DOMDocumentHandler


1 /*
2  * Copyright 2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.xerces.jaxp.validation;
18
19 import javax.xml.transform.dom.DOMResult JavaDoc;
20
21 import org.apache.xerces.xni.XMLDocumentHandler;
22 import org.apache.xerces.xni.XNIException;
23
24 import org.w3c.dom.CDATASection JavaDoc;
25 import org.w3c.dom.Comment JavaDoc;
26 import org.w3c.dom.DocumentType JavaDoc;
27 import org.w3c.dom.ProcessingInstruction JavaDoc;
28 import org.w3c.dom.Text JavaDoc;
29
30 /**
31  * <p>An extension to XMLDocumentHandler for building DOM structures.</p>
32  *
33  * @author Michael Glavassevich, IBM
34  * @version $Id: DOMDocumentHandler.java,v 1.1 2005/05/22 20:08:07 mrglavas Exp $
35  */

36 interface DOMDocumentHandler extends XMLDocumentHandler {
37     
38     /**
39      * <p>Sets the <code>DOMResult</code> object which
40      * receives the constructed DOM nodes.</p>
41      *
42      * @param result the object which receives the constructed DOM nodes
43      */

44     public void setDOMResult(DOMResult JavaDoc result);
45     
46     /**
47      * A document type declaration.
48      *
49      * @param node a DocumentType node
50      *
51      * @exception XNIException Thrown by handler to signal an error.
52      */

53     public void doctypeDecl(DocumentType JavaDoc node) throws XNIException;
54     
55     public void characters(Text JavaDoc node) throws XNIException;
56     
57     public void cdata(CDATASection JavaDoc node) throws XNIException;
58     
59     /**
60      * A comment.
61      *
62      * @param node a Comment node
63      *
64      * @exception XNIException Thrown by application to signal an error.
65      */

66     public void comment(Comment JavaDoc node) throws XNIException;
67     
68     /**
69      * A processing instruction. Processing instructions consist of a
70      * target name and, optionally, text data. The data is only meaningful
71      * to the application.
72      * <p>
73      * Typically, a processing instruction's data will contain a series
74      * of pseudo-attributes. These pseudo-attributes follow the form of
75      * element attributes but are <strong>not</strong> parsed or presented
76      * to the application as anything other than text. The application is
77      * responsible for parsing the data.
78      *
79      * @param node a ProcessingInstruction node
80      *
81      * @exception XNIException Thrown by handler to signal an error.
82      */

83     public void processingInstruction(ProcessingInstruction JavaDoc node) throws XNIException;
84     
85     public void setIgnoringCharacters(boolean ignore);
86 }
87
Popular Tags