Class XMLRenderer

java.lang.Object
net.sourceforge.pmd.cpd.XMLRenderer
All Implemented Interfaces:
CPDReportRenderer

public final class XMLRenderer extends Object implements CPDReportRenderer
Author:
Philippe T'Seyen - original implementation, Romain Pelisse - javax.xml implementation
  • Constructor Details

    • XMLRenderer

      public XMLRenderer()
      Creates a XML Renderer with the default (platform dependent) encoding.
    • XMLRenderer

      public XMLRenderer(String encoding)
      Creates a XML Renderer with a specific output encoding.
      Parameters:
      encoding - the encoding to use or null. If null, default (platform dependent) encoding is used.
  • Method Details

    • setEncoding

      public void setEncoding(String encoding)
    • getEncoding

      public String getEncoding()
    • render

      public void render(CPDReport report, Writer writer) throws IOException
      Description copied from interface: CPDReportRenderer
      Write out the contents of the report to the given writer.
      Specified by:
      render in interface CPDReportRenderer
      Parameters:
      report - The report to write
      writer - A writer for the report file
      Throws:
      IOException - If the writer throws