Class XmlParserErrorHandler

  • All Implemented Interfaces:
    ErrorHandler

    public class XmlParserErrorHandler
    extends Object
    implements ErrorHandler
    The XmlParserErrorHandler class handles warnings and errors that arise while parsing an XML document.
    Author:
    Marcus Portmann
    • Constructor Detail

      • XmlParserErrorHandler

        public XmlParserErrorHandler()
        Constructs a new XmlParserErrorHandler.
      • XmlParserErrorHandler

        public XmlParserErrorHandler​(org.slf4j.Logger logger)
        Constructs a new XmlParserErrorHandler using the specified Logger.
        Parameters:
        logger - the logger to use to log errors and warnings
    • Method Detail

      • error

        public void error​(SAXParseException e)
        Process an error that occurred while parsing the XML.
        Specified by:
        error in interface ErrorHandler
        Parameters:
        e - the exception containing the error details
      • fatalError

        public void fatalError​(SAXParseException e)
        Process a fatal error that occurred while parsing the XML.
        Specified by:
        fatalError in interface ErrorHandler
        Parameters:
        e - the exception containing the fatal error details
      • warning

        public void warning​(SAXParseException e)
        Process a warning that occurred while parsing the XML.
        Specified by:
        warning in interface ErrorHandler
        Parameters:
        e - the exception containing the warning details