Class XMLFormat

java.lang.Object
io.fabric8.maven.XMLFormat

public class XMLFormat extends Object
Output format for an XML document

This experimental class is a simple wrapper around JDOM2's XMLOutputter to provide a simple way to format XML

  • Field Details

    • DEFAULT

      public static final XMLFormat DEFAULT
  • Method Details

    • getIndent

      public String getIndent()
      Returns:
      the number of spaces to use for indentation
    • isInsertLineBreakBetweenMajorSections

      public boolean isInsertLineBreakBetweenMajorSections()
      Returns:
      true if a line break should be inserted between major sections
    • getTextMode

      public XMLFormat.TextMode getTextMode()
    • format

      public String format(Reader reader)
      Format the XML from the given reader
      Parameters:
      reader - the reader
      Returns:
      the formatted XML
    • format

      public void format(Reader reader, Writer writer)
    • builder

      public static XMLFormat.Builder builder()
      Create a new builder
      Returns:
      a new builder
    • builder

      public static XMLFormat.Builder builder(XMLFormat format)
      Create a new builder with the given XMLFormat
      Parameters:
      format - the format
      Returns:
      a new builder