Class XercesParser

    • Constructor Summary

      Constructors 
      Constructor Description
      XercesParser()
      Instantiate a DocumentBuilderFactory.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.w3c.dom.Document create()
      Create a new empty DOM Document object.
      void error​(org.xml.sax.SAXParseException e)
      Receive notification of a recoverable error.
      void fatalError​(org.xml.sax.SAXParseException e)
      Receive notification of a non-recoverable error.
      org.w3c.dom.Document parse​(org.xml.sax.InputSource in)
      Parse the specified InputSource.
      void warning​(org.xml.sax.SAXParseException e)
      Receive notification of a warning.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.stylebook.Component

        init
      • Methods inherited from interface org.apache.stylebook.Parser

        parse
    • Constructor Detail

      • XercesParser

        public XercesParser()
        Instantiate a DocumentBuilderFactory.
    • Method Detail

      • parse

        public org.w3c.dom.Document parse​(org.xml.sax.InputSource in)
                                   throws java.io.IOException,
                                          CreationException
        Parse the specified InputSource.
        Specified by:
        parse in interface Parser
        Parameters:
        in - The InputSource to parse.
        Returns:
        A non-null DOM Document object.
        Throws:
        java.io.IOException - If an I/O error occourred accessing the specified System-ID.
        CreationException - If an error occourred parsing the document.
      • create

        public org.w3c.dom.Document create()
        Create a new empty DOM Document object.
        Specified by:
        create in interface Parser
        Returns:
        A non-null DOM Document object.
        Throws:
        DocumentException - If the new Document cannot be created.
      • error

        public void error​(org.xml.sax.SAXParseException e)
                   throws org.xml.sax.SAXException
        Receive notification of a recoverable error.
        Specified by:
        error in interface org.xml.sax.ErrorHandler
        Parameters:
        e - The Exception thrown during parsing.
        Throws:
        org.xml.sax.SAXException - The Exception notifying the client.
      • fatalError

        public void fatalError​(org.xml.sax.SAXParseException e)
                        throws org.xml.sax.SAXException
        Receive notification of a non-recoverable error.
        Specified by:
        fatalError in interface org.xml.sax.ErrorHandler
        Parameters:
        e - The Exception thrown during parsing.
        Throws:
        org.xml.sax.SAXException - The Exception notifying the client.
      • warning

        public void warning​(org.xml.sax.SAXParseException e)
                     throws org.xml.sax.SAXException
        Receive notification of a warning.
        Specified by:
        warning in interface org.xml.sax.ErrorHandler
        Parameters:
        e - The Exception thrown during parsing.
        Throws:
        org.xml.sax.SAXException - The Exception notifying the client.