|
Oracle Fusion Middleware Oracle WebLogic Server 10.3.1 API Reference 11g Release 1 (10.3.1) Part Number E13941-02 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweblogic.apache.xml.serialize.OutputFormat
public class OutputFormat
Specifies an output format to control the serializer. Based on the XSLT specification for output format, plus additional parameters. Used to select the suitable serializer and determine how the document should be formatted on output.
The two interesting constructors are:
OutputFormat.OutputFormat(String,String,boolean)
creates a format
for the specified method (XML, HTML, Text, etc), encoding and indentation
OutputFormat.OutputFormat(Document,String,boolean)
creates a format
compatible with the document type (XML, HTML, Text, etc), encoding and
indentation
Serializer
,
Method
,
LineSeparator
Nested Class Summary | |
---|---|
static class |
OutputFormat.Defaults
Deprecated. 9.2.0.0 Replaced by org.apache.xml.serialize.OutputFormat.Defaults. |
static class |
OutputFormat.DTD
Deprecated. 9.2.0.0 Replaced by org.apache.xml.serialize.OutputFormat.DTD. |
Constructor Summary | |
---|---|
OutputFormat()
Deprecated. Constructs a new output format with the default values. |
|
OutputFormat(Document doc)
Deprecated. Constructs a new output format with the proper method, document type identifiers and media type for the specified document. |
|
OutputFormat(Document doc,
String encoding,
boolean indenting)
Deprecated. Constructs a new output format with the proper method, document type identifiers and media type for the specified document, and with the specified encoding. |
|
OutputFormat(String method,
String encoding,
boolean indenting)
Deprecated. Constructs a new output format with the default values for the specified method and encoding. |
Method Summary | |
---|---|
String[] |
getCDataElements()
Deprecated. Returns a list of all the elements whose text node children should be output as CDATA, or null if no such elements were specified. |
String |
getDoctypePublic()
Deprecated. Returns the specified document type public identifier, or null. |
String |
getDoctypeSystem()
Deprecated. Returns the specified document type system identifier, or null. |
String |
getEncoding()
Deprecated. Returns the specified encoding. |
EncodingInfo |
getEncodingInfo()
Deprecated. Returns an EncodingInfo |
int |
getIndent()
Deprecated. Returns the indentation specified. |
boolean |
getIndenting()
Deprecated. Returns true if indentation was specified. |
char |
getLastPrintable()
Deprecated. Returns the last printable character based on the selected encoding. |
String |
getLineSeparator()
Deprecated. Returns a specific line separator to use. |
int |
getLineWidth()
Deprecated. Return the selected line width for breaking up long lines. |
String |
getMediaType()
Deprecated. Returns the specified media type, or null. |
String |
getMethod()
Deprecated. Returns the method specified for this output format. |
String[] |
getNonEscapingElements()
Deprecated. Returns a list of all the elements whose text node children should be output unescaped (no character references), or null if no such elements were specified. |
boolean |
getOmitComments()
Deprecated. Returns true if comments should be ommited. |
boolean |
getOmitDocumentType()
Deprecated. Returns true if the DOCTYPE declaration should be ommited. |
boolean |
getOmitXMLDeclaration()
Deprecated. Returns true if the XML document declaration should be ommited. |
boolean |
getPreserveEmptyAttributes()
Deprecated. Returns the preserveEmptyAttribute flag. |
boolean |
getPreserveSpace()
Deprecated. Returns true if the default behavior for this format is to preserve spaces. |
boolean |
getStandalone()
Deprecated. Returns true if the document type is standalone. |
String |
getVersion()
Deprecated. Returns the version for this output method. |
boolean |
isCDataElement(String tagName)
Deprecated. Returns true if the text node children of the given elements should be output as CDATA. |
boolean |
isNonEscapingElement(String tagName)
Deprecated. Returns true if the text node children of the given elements should be output unescaped. |
void |
setCDataElements(String[] cdataElements)
Deprecated. Sets the list of elements for which text node children should be output as CDATA. |
void |
setDoctype(String publicId,
String systemId)
Deprecated. Sets the document type public and system identifiers. |
void |
setEncoding(EncodingInfo encInfo)
Deprecated. Sets the encoding for this output method with an EncodingInfo
instance. |
void |
setEncoding(String encoding)
Deprecated. Sets the encoding for this output method. |
void |
setIndent(int indent)
Deprecated. Sets the indentation. |
void |
setIndenting(boolean on)
Deprecated. Sets the indentation on and off. |
void |
setLineSeparator(String lineSeparator)
Deprecated. Sets the line separator. |
void |
setLineWidth(int lineWidth)
Deprecated. Sets the line width. |
void |
setMediaType(String mediaType)
Deprecated. Sets the media type. |
void |
setMethod(String method)
Deprecated. Sets the method for this output format. |
void |
setNonEscapingElements(String[] nonEscapingElements)
Deprecated. Sets the list of elements for which text node children should be output unescaped (no character references). |
void |
setOmitComments(boolean omit)
Deprecated. Sets comment omitting on and off. |
void |
setOmitDocumentType(boolean omit)
Deprecated. Sets DOCTYPE declaration omitting on and off. |
void |
setOmitXMLDeclaration(boolean omit)
Deprecated. Sets XML declaration omitting on and off. |
void |
setPreserveEmptyAttributes(boolean preserve)
Deprecated. Sets the preserveEmptyAttribute flag. |
void |
setPreserveSpace(boolean preserve)
Deprecated. Sets space preserving as the default behavior. |
void |
setStandalone(boolean standalone)
Deprecated. Sets document DTD standalone. |
void |
setVersion(String version)
Deprecated. Sets the version for this output method. |
static String |
whichDoctypePublic(Document doc)
Deprecated. Returns the document type public identifier specified for this document, or null. |
static String |
whichDoctypeSystem(Document doc)
Deprecated. Returns the document type system identifier specified for this document, or null. |
static String |
whichMediaType(String method)
Deprecated. Returns the suitable media format for a document output with the specified method. |
static String |
whichMethod(Document doc)
Deprecated. Determine the output method for the specified document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OutputFormat()
public OutputFormat(String method, String encoding, boolean indenting)
method
- The specified output methodencoding
- The specified encodingindenting
- True for pretty printingOutputFormat.setEncoding(java.lang.String)
,
OutputFormat.setIndenting(boolean)
,
OutputFormat.setMethod(java.lang.String)
public OutputFormat(Document doc)
doc
- The document to outputOutputFormat.whichMethod(org.w3c.dom.Document)
public OutputFormat(Document doc, String encoding, boolean indenting)
doc
- The document to outputencoding
- The specified encodingindenting
- True for pretty printingOutputFormat.setEncoding(java.lang.String)
,
OutputFormat.setIndenting(boolean)
,
OutputFormat.whichMethod(org.w3c.dom.Document)
Method Detail |
---|
public String getMethod()
OutputFormat.whichMethod(org.w3c.dom.Document)
.
public void setMethod(String method)
method
- The output method, or nullOutputFormat.getMethod()
public String getVersion()
public void setVersion(String version)
version
- The output method version, or nullOutputFormat.getVersion()
public int getIndent()
OutputFormat.setIndenting(boolean)
public boolean getIndenting()
public void setIndent(int indent)
OutputFormat.setIndenting(boolean)
will reset this
value to zero (off) or the default (on).
indent
- The indentation, or zeropublic void setIndenting(boolean on)
OutputFormat.Defaults.Indent
and OutputFormat.Defaults.LineWidth
).
To specify a different indentation level or line wrapping,
use OutputFormat.setIndent(int)
and OutputFormat.setLineWidth(int)
.
on
- True if indentation should be onpublic String getEncoding()
public void setEncoding(String encoding)
Writer
.
encoding
- The encoding, or nullOutputFormat.getEncoding()
public void setEncoding(EncodingInfo encInfo)
EncodingInfo
instance.
public EncodingInfo getEncodingInfo()
EncodingInfo instance for the encoding.
- See Also:
OutputFormat.setEncoding(java.lang.String)
public String getMediaType()
OutputFormat.whichMediaType(java.lang.String)
.
public void setMediaType(String mediaType)
mediaType
- The specified media typeOutputFormat.getMediaType()
public void setDoctype(String publicId, String systemId)
publicId
- The public identifier, or nullsystemId
- The system identifier, or nullpublic String getDoctypePublic()
public String getDoctypeSystem()
public boolean getOmitComments()
public void setOmitComments(boolean omit)
omit
- True if comments should be ommitedpublic boolean getOmitDocumentType()
public void setOmitDocumentType(boolean omit)
omit
- True if DOCTYPE declaration should be ommitedpublic boolean getOmitXMLDeclaration()
public void setOmitXMLDeclaration(boolean omit)
omit
- True if XML declaration should be ommitedpublic boolean getStandalone()
public void setStandalone(boolean standalone)
standalone
- True if document DTD is standalonepublic String[] getCDataElements()
public boolean isCDataElement(String tagName)
tagName
- The element's tag name
public void setCDataElements(String[] cdataElements)
cdataElements
- List of CDATA element tag namespublic String[] getNonEscapingElements()
public boolean isNonEscapingElement(String tagName)
tagName
- The element's tag name
public void setNonEscapingElements(String[] nonEscapingElements)
nonEscapingElements
- List of unescaped element tag namespublic String getLineSeparator()
public void setLineSeparator(String lineSeparator)
lineSeparator
- The specified line separatorpublic boolean getPreserveSpace()
public void setPreserveSpace(boolean preserve)
preserve
- True if spaces should be preservedpublic int getLineWidth()
public void setLineWidth(int lineWidth)
OutputFormat.setIndenting(boolean)
will reset this
value to zero (off) or the default (on).
lineWidth
- The line width to use, zero for defaultOutputFormat.getLineWidth()
,
OutputFormat.setIndenting(boolean)
public boolean getPreserveEmptyAttributes()
public void setPreserveEmptyAttributes(boolean preserve)
preserve
- the preserve flagpublic char getLastPrintable()
public static String whichMethod(Document doc)
HTMLDocument
then the method is said to be html. If the root
element is 'html' and all text nodes preceding the root
element are all whitespace, then the method is said to be
html. Otherwise the method is xml.
doc
- The document to check
public static String whichDoctypePublic(Document doc)
public static String whichDoctypeSystem(Document doc)
public static String whichMediaType(String method)
|
Documentation is available at http://download.oracle.com/docs/cd/E12839_01/web.1111/wls.htm Copyright 1996, 2009, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Oracle Fusion Middleware Oracle WebLogic Server 10.3.1 API Reference 11g Release 1 (10.3.1) Part Number E13941-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |