public final class WstxOutputProperties extends Object
XMLOutputFactory.
| Modifier and Type | Field and Description | 
|---|---|
static String | 
DEFAULT_OUTPUT_ENCODING
If no encoding is passed, we should just default to what xml
 in general expects (and can determine), UTF-8. 
 | 
static String | 
DEFAULT_XML_VERSION
Default xml version number output, if none was specified by
 application. 
 | 
static String | 
P_ADD_SPACE_AFTER_EMPTY_ELEM
Whether writer is to add a single white space before closing "/>"
 of the empty element or not. 
 | 
static String | 
P_AUTOMATIC_END_ELEMENTS
Whether stream writer is to automatically add end elements that are
 needed to properly close the output tree, when the stream is closed
 (either explicitly by a call to  
close or
 closeCompletely, or implicitly by a call
 to writeEndDocument. | 
static String | 
P_COPY_DEFAULT_ATTRS
Whether writer should copy attributes that were initially expanded
 using default settings ("implicit" attributes) or not. 
 | 
static String | 
P_OUTPUT_CDATA_AS_TEXT
Whether writer should just automatically convert all calls that
 would normally produce CDATA to produce (quoted) text. 
 | 
static String | 
P_OUTPUT_EMPTY_ELEMENT_HANDLER
Property that defines an  
EmptyElementHandler used to determine
 if the end tag for an empty element should be written or not. | 
static String | 
P_OUTPUT_ESCAPE_CR
Property that determines whether Carriage Return (\r) characters are
 to be escaped when output or not. 
 | 
static String | 
P_OUTPUT_FIX_CONTENT
Property that further modifies handling of invalid content so
 that if  
P_OUTPUT_VALIDATE_CONTENT is enabled, instead of
 reporting an error, writer will try to fix the problem. | 
static String | 
P_OUTPUT_INVALID_CHAR_HANDLER
Property that defines a  
InvalidCharHandler used to determine
 what to do with a Java character that app tries to output but which
 is not a valid xml character. | 
static String | 
P_OUTPUT_UNDERLYING_STREAM
Property that can be used to find out the underlying
  
OutputStream that an
 XMLStreamWriter instance is using,
 if known (not known if constructed with a Writer,
 or other non-stream destination). | 
static String | 
P_OUTPUT_UNDERLYING_WRITER
Property that can be used to find out the underlying
  
Writer that an
 XMLStreamWriter instance is using,
 if known (may not be known if constructed with a OutputStream,
 or other non-Writer destination). | 
static String | 
P_OUTPUT_VALIDATE_ATTR
Whether output classes should check uniqueness of attribute names,
 to prevent accidental output of duplicate attributes. 
 | 
static String | 
P_OUTPUT_VALIDATE_CONTENT
Whether output classes should do basic verification that the textual
 content output as part of nodes should be checked for validity,
 if there's a possibility of invalid content. 
 | 
static String | 
P_OUTPUT_VALIDATE_NAMES
Whether output classes should check validity of names, ie that they
 only contain legal XML identifier characters. 
 | 
static String | 
P_OUTPUT_VALIDATE_STRUCTURE
Whether output classes should do basic verification that the output
 structure is well-formed (start and end elements match); that
 there is one and only one root, and that there is no textual content
 in prolog/epilog. 
 | 
static String | 
P_USE_DOUBLE_QUOTES_IN_XML_DECL
Whether writer should use double quotes in the XML declaration. 
 | 
| Constructor and Description | 
|---|
WstxOutputProperties()  | 
public static final String DEFAULT_XML_VERSION
public static final String DEFAULT_OUTPUT_ENCODING
Note: you can check out bug entry [WSTX-18] for more details
public static final String P_USE_DOUBLE_QUOTES_IN_XML_DECL
public static final String P_OUTPUT_CDATA_AS_TEXT
public static final String P_COPY_DEFAULT_ATTRS
public static final String P_ADD_SPACE_AFTER_EMPTY_ELEM
The default value is 'false', up to Woodstox 4.x.
NOTE: JavaDocs for versions 4.0.0 - 4.0.7 incorrectly state that default is 'true': this is NOT the case.
Note: added to resolve Jira entry WSTX-125.
public static final String P_AUTOMATIC_END_ELEMENTS
close or
 closeCompletely, or implicitly by a call
 to writeEndDocument.
The default value is 'true' as of Woodstox 4.x. Prior to 4.0, this feature was always enabled and there was no way to disable it)
public static final String P_OUTPUT_VALIDATE_STRUCTURE
public static final String P_OUTPUT_VALIDATE_CONTENT
public static final String P_OUTPUT_VALIDATE_ATTR
public static final String P_OUTPUT_VALIDATE_NAMES
public static final String P_OUTPUT_FIX_CONTENT
P_OUTPUT_VALIDATE_CONTENT is enabled, instead of
 reporting an error, writer will try to fix the problem.
 Invalid content in this context refers  to comment
 content with "--", CDATA with "]]>" and proc. instr data with "?>".
 This can
 be done for some content (CDATA, possibly comment), by splitting
 content into separate
 segments; but not for others (proc. instr, since that might
 change the semantics in unintended ways).public static final String P_OUTPUT_ESCAPE_CR
public static final String P_OUTPUT_INVALID_CHAR_HANDLER
InvalidCharHandler used to determine
 what to do with a Java character that app tries to output but which
 is not a valid xml character. Alternatives are converting it to
 another character or throw an exception: default implementations
 exist for both behaviors.public static final String P_OUTPUT_EMPTY_ELEMENT_HANDLER
EmptyElementHandler used to determine
 if the end tag for an empty element should be written or not.
 
 If specified XMLOutputFactory2.P_AUTOMATIC_EMPTY_ELEMENTS is ignored.public static final String P_OUTPUT_UNDERLYING_STREAM
OutputStream that an
 XMLStreamWriter instance is using,
 if known (not known if constructed with a Writer,
 or other non-stream destination). Null is returned, if not
 known.
Note: in general it is dangerous to operate on returned stream (if any), due to buffering stream writer can do. As such, caller has to take care to know what he is doing, including properly flushing output.
public static final String P_OUTPUT_UNDERLYING_WRITER
Writer that an
 XMLStreamWriter instance is using,
 if known (may not be known if constructed with a OutputStream,
 or other non-Writer destination). Null is returned, if not
 known. Note that the Writer may be an internal wrapper over
 an output stream.
Note: in general it is dangerous to operate on returned Writer (if any), due to buffering stream writer can do. As such, caller has to take care to know what he is doing, including properly flushing output.
Copyright © 2018 FasterXML. All rights reserved.