Enum Class XMLReaders

java.lang.Object
java.lang.Enum<XMLReaders>
org.jdom2.input.sax.XMLReaders
All Implemented Interfaces:
Serializable, Comparable<XMLReaders>, Constable, XMLReaderJDOMFactory

public enum XMLReaders extends Enum<XMLReaders> implements XMLReaderJDOMFactory
An enumeration of XMLReaderJDOMFactory that allows for a single central location to create XMLReaders. The Singletons (members) of this enumeration can produce the most common XMLReaders: non-validating, XSD validating, and DocType validating.

See the package documentation for details of how to create the SAXParser you desire.

Author:
Rolf Lear
See Also:
  • Enum Constant Details

    • NONVALIDATING

      public static final XMLReaders NONVALIDATING
      The non-validating singleton
    • DTDVALIDATING

      public static final XMLReaders DTDVALIDATING
      The DTD-validating Singleton
    • XSDVALIDATING

      public static final XMLReaders XSDVALIDATING
      The XSD-validating Singleton
  • Method Details

    • values

      public static XMLReaders[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static XMLReaders valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • createXMLReader

      public XMLReader createXMLReader() throws JDOMException
      Get a new XMLReader from this JAXP-based XMLReaderJDOMFactory.

      Specified by:
      createXMLReader in interface XMLReaderJDOMFactory
      Returns:
      a new XMLReader instance.
      Throws:
      JDOMException - if there is a problem creating the XMLReader
    • 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