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

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

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

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

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

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

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

      public final 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

      public final 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

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

      public final 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

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

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

      public final 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.