Package org.dom4j.io

Class JAXPHelper


  • class JAXPHelper
    extends Object
    JAXPHelper contains some helper methods for working with JAXP. These methods are kept in a seperate class to avoid class loading issues, such that dom4j can work without JAXP on the CLASSPATH
    Version:
    $Revision: 1.7 $
    Author:
    James Strachan
    • Constructor Detail

      • JAXPHelper

        protected JAXPHelper()
    • Method Detail

      • createXMLReader

        public static XMLReader createXMLReader​(boolean validating,
                                                boolean namespaceAware)
                                         throws Exception
        This method attempts to use JAXP to locate the SAX2 XMLReader implementation. This method uses reflection to avoid being dependent directly on the JAXP classes.
        Parameters:
        validating - DOCUMENT ME!
        namespaceAware - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
        Throws:
        Exception - DOCUMENT ME!
      • createDocument

        public static Document createDocument​(boolean validating,
                                              boolean namespaceAware)
                                       throws Exception
        Throws:
        Exception