Interface XmlMessageReporter<M>

  • All Superinterfaces:
    java.lang.AutoCloseable
    All Known Implementing Classes:
    XmlMessageReporterBase

    public interface XmlMessageReporter<M>
    extends java.lang.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 org.w3c.dom.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 org.w3c.dom.Node node)
        Returns the second stage, which typically allows reporting messages like reporter.at(node).error("an error");.
      • close

        void close()
        Specified by:
        close in interface java.lang.AutoCloseable