1 /* 2 * Copyright 2005 Werner Guttmann 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 package org.exolab.castor.xml; 17 18 /** 19 * Configurable factory object for XML serialization. 20 * 21 * The XML serializer factory is set through the 22 * <tt>org.exolab.castor.xml.serializer.factory</tt> in the 23 * <tt>castor.properties</tt> file shipped with the product JAR. 24 * By default, this is set to a value of 25 * <tt>org.exolab.castor.xml.XercesJDK5XMLSerializerFactory</tt>. This 26 * {@link XMLSerializerFactory} will use the Xerces instance as shipped with 27 * the JRE. 28 * 29 * To use another {@link XMLSerializerFactory}, please override this 30 * property in a custom <tt>castor.properties</tt>. 31 * 32 * When using Castor XML with JDK 5.0 and above, you may switch to 33 * the {@link XercesXMLSerializerFactory}, which will use a separately 34 * downloaded Xerces instance, and not the one shipped with the JRE 35 * itself. 36 * 37 * @author <a href="mailto:werner DOT guttmann AT gmx DOT net">Werner Guttmann</a> 38 * @version $Revision$ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 39 * 2006) $ 40 * 41 * @since 1.0 42 */ 43 public interface XMLSerializerFactory { 44 45 /** 46 * Factory method for obtaining a Serializer instance. 47 * 48 * @return A Serializer instance. 49 */ 50 Serializer getSerializer(); 51 52 /** 53 * Factory method for obtaining a OutputFormat instance. 54 * 55 * @return A OutputFormat instance. 56 */ 57 OutputFormat getOutputFormat(); 58 }