1/*
2 * reserved comment block
3 * DO NOT REMOVE OR ALTER!
4 */
5/*
6 * Licensed to the Apache Software Foundation (ASF) under one or more
7 * contributor license agreements.  See the NOTICE file distributed with
8 * this work for additional information regarding copyright ownership.
9 * The ASF licenses this file to You under the Apache License, Version 2.0
10 * (the "License"); you may not use this file except in compliance with
11 * the License.  You may obtain a copy of the License at
12 *
13 *      http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22
23package com.sun.org.apache.xml.internal.serialize;
24
25
26import java.io.IOException;
27import org.w3c.dom.Element;
28import org.w3c.dom.Document;
29import org.w3c.dom.DocumentFragment;
30
31
32
33/**
34 * Interface for a DOM serializer implementation.
35 *
36 *
37 * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
38 * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
39 *
40 * @deprecated As of JDK 9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
41 * is replaced by that of Xalan. Main class
42 * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
43 * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.
44 */
45public interface DOMSerializer
46{
47
48
49    /**
50     * Serialized the DOM element. Throws an exception only if
51     * an I/O exception occured while serializing.
52     *
53     * @param elem The element to serialize
54     * @throws IOException An I/O exception occured while
55     *   serializing
56     */
57    public void serialize( Element elem )
58        throws IOException;
59
60
61    /**
62     * Serializes the DOM document. Throws an exception only if
63     * an I/O exception occured while serializing.
64     *
65     * @param doc The document to serialize
66     * @throws IOException An I/O exception occured while
67     *   serializing
68     */
69    public void serialize( Document doc )
70        throws IOException;
71
72
73    /**
74     * Serializes the DOM document fragment. Throws an exception
75     * only if an I/O exception occured while serializing.
76     *
77     * @param frag The document fragment to serialize
78     * @throws IOException An I/O exception occured while
79     *   serializing
80     */
81    public void serialize( DocumentFragment frag )
82        throws IOException;
83
84
85}
86