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