Class SAXParser


  • public final class SAXParser
    extends java.lang.Object
    Basic SAX Parser
    Author:
    Mark Woodbridge
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void parse​(org.xml.sax.InputSource is, org.xml.sax.helpers.DefaultHandler handler)
      Parse the an xml file
      static void parse​(org.xml.sax.InputSource is, org.xml.sax.helpers.DefaultHandler handler, boolean validate)
      Parse the an xml file
      • Methods inherited from class java.lang.Object

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

      • parse

        public static void parse​(org.xml.sax.InputSource is,
                                 org.xml.sax.helpers.DefaultHandler handler)
                          throws org.xml.sax.SAXException,
                                 java.io.IOException,
                                 javax.xml.parsers.ParserConfigurationException
        Parse the an xml file
        Parameters:
        is - the inputsource to parse
        handler - the SAX event handler to use
        Throws:
        org.xml.sax.SAXException - if an error occurs during parsing
        java.io.IOException - if an error occurs reading from the InputSource
        javax.xml.parsers.ParserConfigurationException - if there is an error in the config
      • parse

        public static void parse​(org.xml.sax.InputSource is,
                                 org.xml.sax.helpers.DefaultHandler handler,
                                 boolean validate)
                          throws org.xml.sax.SAXException,
                                 java.io.IOException,
                                 javax.xml.parsers.ParserConfigurationException
        Parse the an xml file
        Parameters:
        is - the inputsource to parse
        handler - the SAX event handler to use
        validate - if true, validate before parsing
        Throws:
        org.xml.sax.SAXException - if an error occurs during parsing
        java.io.IOException - if an error occurs reading from the InputSource
        javax.xml.parsers.ParserConfigurationException - if there is an error in the config