KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > xml > serialize > DOMSerializer


1 /*
2  * Copyright 1999-2002,2004 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
18 package org.apache.xml.serialize;
19
20
21 import java.io.IOException JavaDoc;
22 import org.w3c.dom.Element JavaDoc;
23 import org.w3c.dom.Document JavaDoc;
24 import org.w3c.dom.DocumentFragment JavaDoc;
25
26
27
28 /**
29  * Interface for a DOM serializer implementation.
30  *
31  *
32  * @version $Revision: 1.5 $ $Date: 2004/02/24 23:34:03 $
33  * @author <a HREF="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
34  * @author <a HREF="mailto:arkin@intalio.com">Assaf Arkin</a>
35  */

36 public interface DOMSerializer
37 {
38
39
40     /**
41      * Serialized the DOM element. Throws an exception only if
42      * an I/O exception occured while serializing.
43      *
44      * @param elem The element to serialize
45      * @throws IOException An I/O exception occured while
46      * serializing
47      */

48     public void serialize( Element JavaDoc elem )
49         throws IOException JavaDoc;
50
51
52     /**
53      * Serializes the DOM document. Throws an exception only if
54      * an I/O exception occured while serializing.
55      *
56      * @param doc The document to serialize
57      * @throws IOException An I/O exception occured while
58      * serializing
59      */

60     public void serialize( Document JavaDoc doc )
61         throws IOException JavaDoc;
62
63
64     /**
65      * Serializes the DOM document fragment. Throws an exception
66      * only if an I/O exception occured while serializing.
67      *
68      * @param frag The document fragment to serialize
69      * @throws IOException An I/O exception occured while
70      * serializing
71      */

72     public void serialize( DocumentFragment JavaDoc frag )
73         throws IOException JavaDoc;
74
75
76 }
77
78
79
80
Popular Tags