Interface Indentation

All Known Implementing Classes:
IndentingXMLEventWriter, IndentingXMLStreamWriter

public interface Indentation
Characters that represent line breaks and indentation. These are represented as String-valued JavaBean properties.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Two spaces; the default indentation.
    static final String
    "\n"; the normalized representation of end-of-line in XML.
  • Method Summary

    Modifier and Type
    Method
    Description
    The characters used for one level of indentation.
    The characters that introduce a new line.
    void
    setIndent(String indent)
    Set the characters used for one level of indentation.
    void
    setNewLine(String newLine)
    Set the characters that introduce a new line.
  • Field Details

  • Method Details

    • setIndent

      void setIndent(String indent)
      Set the characters used for one level of indentation. The default is DEFAULT_INDENT. "\t" is a popular alternative.
    • getIndent

      String getIndent()
      The characters used for one level of indentation.
    • setNewLine

      void setNewLine(String newLine)
      Set the characters that introduce a new line. The default is NORMAL_END_OF_LINE. IndentingXMLStreamWriter.getLineSeparator()() is a popular alternative.
    • getNewLine

      String getNewLine()
      The characters that introduce a new line.