Class XMLReaderSAX2Factory

java.lang.Object
org.jdom2.input.sax.XMLReaderSAX2Factory
All Implemented Interfaces:
XMLReaderJDOMFactory

public class XMLReaderSAX2Factory extends Object implements XMLReaderJDOMFactory
Create XMLReaders directly from the SAX2.0 API using a SAX Driver class name or the default SAX2.0 location process.

Unless you have good reason to use this mechanism you should rather use the JAXP-based processes. Read the package documentation for other alternatives.

Author:
Rolf Lear
See Also:
  • Constructor Details

  • Method Details

    • createXMLReader

      public XMLReader createXMLReader() throws JDOMException
      Description copied from interface: XMLReaderJDOMFactory
      Return a new XMLReader according to the implementation of this XMLReaderJDOMFactory instance. The XMLReader is expected to be a new instance that is unrelated to any other XMLReaders, and can be reused at will by SAXBuilder.
      Specified by:
      createXMLReader in interface XMLReaderJDOMFactory
      Returns:
      a new XMLReader
      Throws:
      JDOMException - if an XMLReader was not available.
    • getDriverClassName

      public String getDriverClassName()
      Get the SAX Driver class name used to bootstrap XMLReaders.
      Returns:
      The name of the SAX Driver class (null for SAX2 default class).
    • isValidating

      public boolean isValidating()
      Description copied from interface: XMLReaderJDOMFactory
      Does an XMLReader from this factory do more than just well-formed checks.
      Specified by:
      isValidating in interface XMLReaderJDOMFactory
      Returns:
      true if the XMLReader validates