KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * Copyright 1999-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  * $Id: DOMSerializer.java,v 1.3 2004/02/17 04:18:18 minchau Exp $
18  */

19 package org.apache.xml.serializer;
20
21 import java.io.IOException JavaDoc;
22
23 import org.w3c.dom.Node JavaDoc;
24
25 /**
26  * Interface for a DOM serializer implementation.
27  * <p>
28  * The DOM serializer is a facet of a serializer. A serializer may or may
29  * not support a DOM serializer.
30  * <p>
31  * Example:
32  * <pre>
33  * Document doc;
34  * Serializer ser;
35  * OutputStream os;
36  *
37  * ser.setOutputStream( os );
38  * ser.asDOMSerializer( doc );
39  * </pre>
40  *
41  *
42  * @version Alpha
43  * @author <a HREF="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
44  * @author <a HREF="mailto:arkin@exoffice.com">Assaf Arkin</a>
45  */

46 public interface DOMSerializer
47 {
48     /**
49      * Serializes the DOM node. Throws an exception only if an I/O
50      * exception occured while serializing.
51      *
52      * @param node the DOM node to serialize
53      * @throws IOException if an I/O exception occured while serializing
54      */

55     public void serialize(Node JavaDoc node) throws IOException JavaDoc;
56 }
57
Popular Tags