public static enum XmlWriter.Feature extends java.lang.Enum<XmlWriter.Feature>
Enum Constant | Description |
---|---|
ALLOW_PARTIAL_XML |
If enabled, partial xml writing is allowed.
|
ALWAYS_ENTITIZE_ATTRIBUTES |
If set, always replaces certain characters by their entity in attributes, even if this is not necessary.
|
APPEND_FINAL_EOL |
If set, and PRETTY_PRINT is also enabled, appends EOL on last line.
|
DONT_VALIDATE_CHARS |
If enabled, elements content and attributes values are not checked.
|
DONT_VALIDATE_NAMES |
If enabled, elements and attributes names are not checked.
|
PRETTY_PRINT |
If set, pretty print output.
|
USE_CONVERTER |
If set, use converter for element and attribute names.
|
USE_SINGLE_QUOTE |
If set, use single quote instead of double quote for attribute delimiter.
|
USE_XML_EOL |
If set, use LF for EOL.
|
Modifier and Type | Method | Description |
---|---|---|
static XmlWriter.Feature |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static XmlWriter.Feature[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final XmlWriter.Feature PRETTY_PRINT
public static final XmlWriter.Feature USE_XML_EOL
Otherwise, use platform way to mark EOL.
This applies to text, comments and attributes.
public static final XmlWriter.Feature APPEND_FINAL_EOL
Otherwise, last line does not end with EOL.
public static final XmlWriter.Feature USE_SINGLE_QUOTE
public static final XmlWriter.Feature ALWAYS_ENTITIZE_ATTRIBUTES
'
is replaced even if delimiter is "
.
"
is replaced even if delimiter is '
.
>
is replaced even if not mandatory.
\t
, which is always replaced.
\n
, which is always replaced.
\r
, which is always replaced.
&
, which is always replaced.
<
, which is always replaced.
public static final XmlWriter.Feature USE_CONVERTER
public static final XmlWriter.Feature ALLOW_PARTIAL_XML
Otherwise, only xml documents (and their content) can be produced.
This option must be set to allow generating, for example:
<!-- a comment -->
<element att="value"/>
public static final XmlWriter.Feature DONT_VALIDATE_NAMES
public static final XmlWriter.Feature DONT_VALIDATE_CHARS
public static XmlWriter.Feature[] values()
for (XmlWriter.Feature c : XmlWriter.Feature.values()) System.out.println(c);
public static XmlWriter.Feature valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullCopyright © 2019. All rights reserved.