|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XMLIndentation
Specifies how to indent an XML template or document. The default implementation
NEVER
will disable all indentation and is recommended for production use.
Other available implementations are XHTML
and ALWAYS
, though
one can provide his own implementation if necessary.
Nested Class Summary | |
---|---|
static class |
XMLIndentation.IndentType
|
Field Summary | |
---|---|
static XMLIndentation |
ALWAYS
Implementation that indents all elements using four whitespaces per level and uses the system property line.separator as line separator. |
static XMLIndentation |
NEVER
Default implementation that ensures no indentation will be performed. |
static XHTMLIndentation |
XHTML
An instance of of the XHTMLIndentation class, provided here for convenience. |
Method Summary | |
---|---|
String |
getIndentation()
Returns the indentation string to prefix every line for each level of indentation. |
XMLIndentation.IndentType |
getIndentType(Element element)
Decide whether indentation should be increased when printing the children of the specified element. |
String |
getLineBreak()
Returns the string used to represent linebreaks. |
boolean |
isWhitespaceSensitive(Element element)
Returns true if the specified element is sensitive to repeated whitespace. |
Field Detail |
---|
static final XMLIndentation ALWAYS
static final XMLIndentation NEVER
static final XHTMLIndentation XHTML
XHTMLIndentation
class, provided here for convenience.
Method Detail |
---|
String getIndentation()
XMLIndentation.IndentType getIndentType(Element element)
element
- an XML element about to be printed
String getLineBreak()
boolean isWhitespaceSensitive(Element element)
element
- an XML element about to be printed
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |