Class XMLValidator.ErrorHandler

  • All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
    Enclosing class:
    XMLValidator

    static class XMLValidator.ErrorHandler
    extends org.xml.sax.helpers.DefaultHandler
    XML handler that throws exception on error and warning, does nothing otherwise.
    • Constructor Summary

      Constructors 
      Constructor Description
      ErrorHandler()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void error​(org.xml.sax.SAXParseException e)  
      void warning​(org.xml.sax.SAXParseException e)  
      • Methods inherited from class org.xml.sax.helpers.DefaultHandler

        characters, endDocument, endElement, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ErrorHandler

        ErrorHandler()
    • Method Detail

      • warning

        public void warning​(org.xml.sax.SAXParseException e)
                     throws org.xml.sax.SAXException
        Specified by:
        warning in interface org.xml.sax.ErrorHandler
        Overrides:
        warning in class org.xml.sax.helpers.DefaultHandler
        Throws:
        org.xml.sax.SAXException
      • error

        public void error​(org.xml.sax.SAXParseException e)
                   throws org.xml.sax.SAXException
        Specified by:
        error in interface org.xml.sax.ErrorHandler
        Overrides:
        error in class org.xml.sax.helpers.DefaultHandler
        Throws:
        org.xml.sax.SAXException