public static class Format.TextMode extends Object
Text Mode | Resulting behavior. |
---|---|
PRESERVE (Default) | All content is printed in the format it was created, no whitespace or line separators are are added or removed. |
TRIM_FULL_WHITE | Content between tags consisting of all whitespace is not printed. If the content contains even one non-whitespace character, it is printed verbatim, whitespace and all. |
TRIM | Same as TrimAllWhite, plus leading/trailing whitespace are trimmed. |
NORMALIZE | Same as TextTrim, plus addition interior whitespace is compressed to a single space. |
Modifier and Type | Field and Description |
---|---|
static Format.TextMode |
NORMALIZE
Mode for text normalization (left and right trim plus internal
whitespace is normalized to a single space.
|
static Format.TextMode |
PRESERVE
Mode for literal text preservation.
|
static Format.TextMode |
TRIM
Mode for text trimming (left and right trim).
|
static Format.TextMode |
TRIM_FULL_WHITE
Mode for text trimming of content consisting of nothing but
whitespace but otherwise not changing output.
|
public static final Format.TextMode PRESERVE
public static final Format.TextMode TRIM
public static final Format.TextMode NORMALIZE
Element.getTextNormalize()
public static final Format.TextMode TRIM_FULL_WHITE
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.