Class XMLErrorHandler

  • All Implemented Interfaces:
    org.xml.sax.ErrorHandler

    class XMLErrorHandler
    extends java.lang.Object
    implements org.xml.sax.ErrorHandler
    Error handler to report errors and warnings from the XML parser. Implements standard SAX ErrorHandler methods, see SAX docs for more info.
    See Also:
    FileOME, FileVOI, FileXML
    • Constructor Summary

      Constructors 
      Constructor Description
      XMLErrorHandler()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void error​(org.xml.sax.SAXParseException spe)
      Handles parse exception errors by passing the parse exception up as a SAXException.
      void fatalError​(org.xml.sax.SAXParseException spe)
      Handles parse exception fatal errors by passing the parse exception up as a SAXException.
      private java.lang.String getParseExceptionInfo​(org.xml.sax.SAXParseException spe)
      Returns a string describing parse exception details.
      void warning​(org.xml.sax.SAXParseException spe)
      Handles parse exception warnings by outputting them to the debug window.
      • Methods inherited from class java.lang.Object

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

      • XMLErrorHandler

        XMLErrorHandler()
    • Method Detail

      • error

        public void error​(org.xml.sax.SAXParseException spe)
                   throws org.xml.sax.SAXException
        Handles parse exception errors by passing the parse exception up as a SAXException.
        Specified by:
        error in interface org.xml.sax.ErrorHandler
        Parameters:
        spe - the parse exception
        Throws:
        org.xml.sax.SAXException - passed up with the parse exception info
      • fatalError

        public void fatalError​(org.xml.sax.SAXParseException spe)
                        throws org.xml.sax.SAXException
        Handles parse exception fatal errors by passing the parse exception up as a SAXException.
        Specified by:
        fatalError in interface org.xml.sax.ErrorHandler
        Parameters:
        spe - the parse exception
        Throws:
        org.xml.sax.SAXException - passed up with the parse exception info
      • warning

        public void warning​(org.xml.sax.SAXParseException spe)
                     throws org.xml.sax.SAXException
        Handles parse exception warnings by outputting them to the debug window.
        Specified by:
        warning in interface org.xml.sax.ErrorHandler
        Parameters:
        spe - the parse exception
        Throws:
        org.xml.sax.SAXException - not reported for warnings
      • getParseExceptionInfo

        private java.lang.String getParseExceptionInfo​(org.xml.sax.SAXParseException spe)
        Returns a string describing parse exception details.
        Parameters:
        spe - the parse exception
        Returns:
        a string containing information about the exception