Top Description Fields
com.ctc.wstx.cfg

public Interface OutputConfigFlags

Known Direct Implementers
com.ctc.wstx.stax.WstxOutputFactory, com.ctc.wstx.sw.BaseStreamWriter, com.ctc.wstx.api.WriterConfig

Constant interface that contains configuration flag used by output classes internally, for presenting on/off configuration options.

Field Summary

Modifier and TypeField and Description
public static final int
CFG_ADD_SPACE_AFTER_EMPTY_ELEM

Flag that indicates whether writer is to add a single white space before closing "/>" of the empty element or not.

public static final int
CFG_AUTO_CLOSE_OUTPUT

Property that enables/disables stream write to close the underlying output target, either when it is asked to (.close() is called), or when it doesn't need it any more (reaching EOF, hitting an unrecoverable exception).

public static final int
public static final int
CFG_AUTOMATIC_END_ELEMENTS

Flag that indicates we can output 'automatic' empty elements; end elements needed to close the logical output tree when stream writer is closed (by closing it explicitly, or by writing end-document event)

public static final int
public static final int
CFG_COPY_DEFAULT_ATTRS

Flag that indicates whether attributes expanded from default attribute values should be copied to output, when using copy methods.

public static final int
CFG_ENABLE_NS

Flag that indicates whether writer is namespace-aware or not; if not, only local part is ever used.

public static final int
CFG_ESCAPE_CR

Flag that indicates whether CR (\r, ascii 13) characters occuring in text (CHARACTERS) and attribute values should be escaped using character entities or not.

public static final int
CFG_FIX_CONTENT

Flag that will enable writer that checks for validity of content to try to fix the problem, by splitting output segments as necessary.

public static final int
CFG_OUTPUT_CDATA_AS_TEXT

Whether writer should just automatically convert all calls that would normally produce CDATA to produce (quoted) text.

public static final int
CFG_USE_DOUBLE_QUOTES_IN_XML_DECL

Property that indicates if singe quotes or double quotes should be used in the XML declaration.

public static final int
CFG_VALIDATE_ATTR

Flag that indicates we should check uniqueness of attribute names, to prevent accidental output of duplicate attributes.

public static final int
CFG_VALIDATE_CONTENT

Flag that indicates we should check validity of textual content of nodes that have constraints.

public static final int
CFG_VALIDATE_NAMES

Flag that indicates we should check validity of names (element and attribute names and prefixes; processing instruction names), that they contain only legal identifier characters.

public static final int

Field Detail

CFG_ADD_SPACE_AFTER_EMPTY_ELEMback to summary
public static final int CFG_ADD_SPACE_AFTER_EMPTY_ELEM

Flag that indicates whether writer is to add a single white space before closing "/>" of the empty element or not. It is sometimes useful to add to increase compatibility with HTML browsers, or to increase readability.

CFG_AUTO_CLOSE_OUTPUTback to summary
public static final int CFG_AUTO_CLOSE_OUTPUT

Property that enables/disables stream write to close the underlying output target, either when it is asked to (.close() is called), or when it doesn't need it any more (reaching EOF, hitting an unrecoverable exception). As per Stax 1.0 specification, automatic closing is NOT enabled by default; except if the caller has no access to the target (i.e. when factory created it)

CFG_AUTOMATIC_EMPTY_ELEMENTSback to summary
public static final int CFG_AUTOMATIC_EMPTY_ELEMENTS
CFG_AUTOMATIC_END_ELEMENTSback to summary
public static final int CFG_AUTOMATIC_END_ELEMENTS

Flag that indicates we can output 'automatic' empty elements; end elements needed to close the logical output tree when stream writer is closed (by closing it explicitly, or by writing end-document event)

Since
3.2.8
CFG_AUTOMATIC_NSback to summary
public static final int CFG_AUTOMATIC_NS
CFG_COPY_DEFAULT_ATTRSback to summary
public static final int CFG_COPY_DEFAULT_ATTRS

Flag that indicates whether attributes expanded from default attribute values should be copied to output, when using copy methods.

CFG_ENABLE_NSback to summary
public static final int CFG_ENABLE_NS

Flag that indicates whether writer is namespace-aware or not; if not, only local part is ever used.

CFG_ESCAPE_CRback to summary
public static final int CFG_ESCAPE_CR

Flag that indicates whether CR (\r, ascii 13) characters occuring in text (CHARACTERS) and attribute values should be escaped using character entities or not. Escaping is needed to enable seamless round-tripping (preserving CR characters).

CFG_FIX_CONTENTback to summary
public static final int CFG_FIX_CONTENT

Flag that will enable writer that checks for validity of content to try to fix the problem, by splitting output segments as necessary. If disabled, validation will throw an exception; and without validation no problem is noticed by writer (but instead invalid output is created).

CFG_OUTPUT_CDATA_AS_TEXTback to summary
public static final int CFG_OUTPUT_CDATA_AS_TEXT

Whether writer should just automatically convert all calls that would normally produce CDATA to produce (quoted) text.

CFG_USE_DOUBLE_QUOTES_IN_XML_DECLback to summary
public static final int CFG_USE_DOUBLE_QUOTES_IN_XML_DECL

Property that indicates if singe quotes or double quotes should be used in the XML declaration. The default is to use single quotes.

CFG_VALIDATE_ATTRback to summary
public static final int CFG_VALIDATE_ATTR

Flag that indicates we should check uniqueness of attribute names, to prevent accidental output of duplicate attributes.

CFG_VALIDATE_CONTENTback to summary
public static final int CFG_VALIDATE_CONTENT

Flag that indicates we should check validity of textual content of nodes that have constraints.

Specifically: comments can not have '--', CDATA sections can not have ']]>' and processing instruction can not have '?>;' character combinations in content passed in.

CFG_VALIDATE_NAMESback to summary
public static final int CFG_VALIDATE_NAMES

Flag that indicates we should check validity of names (element and attribute names and prefixes; processing instruction names), that they contain only legal identifier characters.

CFG_VALIDATE_STRUCTUREback to summary
public static final int CFG_VALIDATE_STRUCTURE