Module org.jooq
Package org.jooq

Class XMLFormat

java.lang.Object
org.jooq.XMLFormat

public final class XMLFormat extends Object
An XML formatting type, which can be used to configure XML imports / exports.

The type is immutable, meaning calls to setters like header(boolean) do not modify the original reference, but return a new one instead.

Author:
Lukas Eder
  • Field Details

    • DEFAULT_FOR_RESULTS

      public static final XMLFormat DEFAULT_FOR_RESULTS
    • DEFAULT_FOR_RECORDS

      public static final XMLFormat DEFAULT_FOR_RECORDS
  • Constructor Details

    • XMLFormat

      public XMLFormat()
  • Method Details

    • xmlns

      @NotNull public final @NotNull XMLFormat xmlns(boolean newXmlns)
      The new value for the xmlns flag, defaulting to true.
    • xmlns

      public final boolean xmlns()
      The xmlns flag.
    • format

      @NotNull public final @NotNull XMLFormat format(boolean newFormat)
      The new value for the formatting flag, defaulting to false.
    • format

      public final boolean format()
      The formatting flag.
    • newline

      @NotNull public final @NotNull XMLFormat newline(String newNewline)
      The new newline character, defaulting to \n.
    • newline

      @NotNull public final @NotNull String newline()
      The formatting flag.
    • globalIndent

      @NotNull public final @NotNull XMLFormat globalIndent(int newGlobalIndent)
      The new global indentation size applied on all levels, defaulting to 0.
    • globalIndent

      public final int globalIndent()
      The global indentation applied on all levels.
    • indent

      @NotNull public final @NotNull XMLFormat indent(int newIndent)
      The new indentation size per level value, defaulting to 2.
    • indent

      public final int indent()
      The indentation size per level.
    • indentString

      @NotNull public final @NotNull String indentString(int level)
      Convenience method to get an indentation string at a given level.
    • header

      @NotNull public final @NotNull XMLFormat header(boolean newHeader)
      The new header value, defaulting to true.

      This flag governs whether the /result/fields element should be generated on export.

      This flag is ignored on Formattable.formatXML(XMLFormat) and similar methods.

    • header

      public final boolean header()
      The header.
    • recordFormat

      @NotNull public final @NotNull XMLFormat recordFormat(XMLFormat.RecordFormat newRecordFormat)
      The record format to be applied, defaulting to XMLFormat.RecordFormat.VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE.
    • recordFormat

      @NotNull public final @NotNull XMLFormat.RecordFormat recordFormat()
      The record format to be applied, defaulting to XMLFormat.RecordFormat.VALUE_ELEMENTS_WITH_FIELD_ATTRIBUTE.
    • quoteNested

      @NotNull public final @NotNull XMLFormat quoteNested(boolean newQuoteNested)
      Whether nested XML content should be quoted like a string, or nested into XML formatted output.
    • quoteNested

      public final boolean quoteNested()
      Whether nested XML content should be quoted like a string, or nested into XML formatted output.