Package: XHTMLSerializer
XHTMLSerializer
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
XHTMLSerializer() |
|
|
|
|
|
||||||||||||||||||||
XHTMLSerializer(OutputFormat) |
|
|
|
|
|
||||||||||||||||||||
XHTMLSerializer(OutputStream, OutputFormat) |
|
|
|
|
|
||||||||||||||||||||
XHTMLSerializer(Writer, OutputFormat) |
|
|
|
|
|
||||||||||||||||||||
setOutputFormat(OutputFormat) |
|
|
|
|
|
Coverage
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:
18: package it.tidalwave.northernwind.core.impl.patches;
19:
20:
21: import java.io.OutputStream;
22: import java.io.Writer;
23: import com.sun.org.apache.xml.internal.serialize.BaseMarkupSerializer;
24: import com.sun.org.apache.xml.internal.serialize.Method;
25: import com.sun.org.apache.xml.internal.serialize.OutputFormat;
26: import com.sun.org.apache.xml.internal.serialize.Serializer;
27:
28:
29: /**
30: * Implements an XHTML serializer supporting both DOM and SAX
31: * pretty serializing. For usage instructions see either {@link
32: * Serializer} or {@link BaseMarkupSerializer}.
33: *
34: * @deprecated This class was deprecated in Xerces 2.6.2. It is
35: * recommended that new applications use JAXP's Transformation API
36: * for XML (TrAX) for serializing XHTML. See the Xerces documentation
37: * for more information.
38: * @version $Revision$ $Date$
39: * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
40: * @see Serializer
41: */
42: @SuppressWarnings("all")
43: public class XHTMLSerializer
44: extends HTMLSerializer
45: {
46:
47:
48: /**
49: * Constructs a new serializer. The serializer cannot be used without
50: * calling {@link #setOutputCharStream} or {@link #setOutputByteStream}
51: * first.
52: */
53: public XHTMLSerializer()
54: {
55: super( true, new OutputFormat( Method.XHTML, null, false ) );
56: }
57:
58:
59: /**
60: * Constructs a new serializer. The serializer cannot be used without
61: * calling {@link #setOutputCharStream} or {@link #setOutputByteStream}
62: * first.
63: */
64: public XHTMLSerializer( OutputFormat format )
65: {
66:• super( true, format != null ? format : new OutputFormat( Method.XHTML, null, false ) );
67: }
68:
69:
70: /**
71: * Constructs a new serializer that writes to the specified writer
72: * using the specified output format. If <tt>format</tt> is null,
73: * will use a default output format.
74: *
75: * @param writer The writer to use
76: * @param format The output format to use, null for the default
77: */
78: public XHTMLSerializer( Writer writer, OutputFormat format )
79: {
80:• super( true, format != null ? format : new OutputFormat( Method.XHTML, null, false ) );
81: setOutputCharStream( writer );
82: }
83:
84:
85: /**
86: * Constructs a new serializer that writes to the specified output
87: * stream using the specified output format. If <tt>format</tt>
88: * is null, will use a default output format.
89: *
90: * @param output The output stream to use
91: * @param format The output format to use, null for the default
92: */
93: public XHTMLSerializer( OutputStream output, OutputFormat format )
94: {
95:• super( true, format != null ? format : new OutputFormat( Method.XHTML, null, false ) );
96: setOutputByteStream( output );
97: }
98:
99:
100: public void setOutputFormat( OutputFormat format )
101: {
102:• super.setOutputFormat( format != null ? format : new OutputFormat( Method.XHTML, null, false ) );
103: }
104:
105:
106: }