Interface XmlMessageReporter<M>

  • All Superinterfaces:
    AutoCloseable
    All Known Implementing Classes:
    XmlMessageReporterBase

    public interface XmlMessageReporter<M>
    extends AutoCloseable
    Reports errors in an XML document. This is meant as a helper to carry around while validating an XML document. This interface is the API provided to the validating code, what happens to the messages is up to the implementation of the second stage (which is meant to be some specific logger/ message reporter). Instances may wrap an XmlPositioner to associate DOM nodes with an position for better error messages.

    A base implementation is available in XmlMessageReporterBase. Implementations should use OoxmlFacade.getPrinter() as a back-end to render the messages.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      M at​(@Nullable Node node)
      Returns the second stage, which typically allows reporting messages like reporter.at(node).error("an error");.
      void close()  
    • Method Detail

      • at

        M at​(@Nullable Node node)
        Returns the second stage, which typically allows reporting messages like reporter.at(node).error("an error");.