01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.xml.serialize;
19:
20: import java.io.IOException;
21: import org.w3c.dom.Element;
22: import org.w3c.dom.Document;
23: import org.w3c.dom.DocumentFragment;
24:
25: /**
26: * Interface for a DOM serializer implementation.
27: *
28: * @deprecated This class was deprecated in Xerces 2.9.0. It is recommended
29: * that new applications use the DOM Level 3 LSSerializer or JAXP's Transformation
30: * API for XML (TrAX) for serializing XML. See the Xerces documentation for more
31: * information.
32: * @version $Revision: 476047 $ $Date: 2006-11-16 23:27:45 -0500 (Thu, 16 Nov 2006) $
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: * Serialized the DOM element. Throws an exception only if
40: * an I/O exception occured while serializing.
41: *
42: * @param elem The element to serialize
43: * @throws IOException An I/O exception occured while
44: * serializing
45: */
46: public void serialize(Element elem) throws IOException;
47:
48: /**
49: * Serializes the DOM document. Throws an exception only if
50: * an I/O exception occured while serializing.
51: *
52: * @param doc The document to serialize
53: * @throws IOException An I/O exception occured while
54: * serializing
55: */
56: public void serialize(Document doc) throws IOException;
57:
58: /**
59: * Serializes the DOM document fragment. Throws an exception
60: * only if an I/O exception occured while serializing.
61: *
62: * @param frag The document fragment to serialize
63: * @throws IOException An I/O exception occured while
64: * serializing
65: */
66: public void serialize(DocumentFragment frag) throws IOException;
67:
68: }
|