Class BasicXmlWriter

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public final class BasicXmlWriter extends XmlWriter<BasicXmlWriter>
Concrete XmlWriter leaf for standard XML output.

This is the directly-instantiable form of XmlWriter, which is itself an abstract CRTP self-type base so it can also be extended (e.g. by HtmlWriter).

Notes:
  • This class is not intended for external use.
  • Constructor Details

    • BasicXmlWriter

      public BasicXmlWriter(Writer out, boolean useWhitespace, int maxIndent, boolean trimStrings, char quoteChar, UriResolver uriResolver, boolean enableNs, Namespace defaultNamespace)
      Constructor.
      Parameters:
      out - The wrapped writer.
      useWhitespace - If true XML elements will be indented.
      maxIndent - The maximum indentation level.
      trimStrings - If true, strings should be trimmed before they're serialized.
      quoteChar - The quote character to use for attributes. Should be '\'' or '"'.
      uriResolver - The URI resolver for resolving URIs to absolute or root-relative form.
      enableNs - Flag to indicate if XML namespaces are enabled.
      defaultNamespace - The default namespace if XML namespaces are enabled.