Class XMLReaderSAX2Factory
java.lang.Object
org.jdom2.input.sax.XMLReaderSAX2Factory
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionXMLReaderSAX2Factory(boolean validate) The required details for SAX2.0-based XMLReader creation.XMLReaderSAX2Factory(boolean validate, String saxdriver) The required details for SAX2.0-based XMLReader creation. -
Method Summary
Modifier and TypeMethodDescriptionReturn a new XMLReader according to the implementation of this XMLReaderJDOMFactory instance.Get the SAX Driver class name used to bootstrap XMLReaders.booleanDoes an XMLReader from this factory do more than just well-formed checks.
-
Constructor Details
-
XMLReaderSAX2Factory
public XMLReaderSAX2Factory(boolean validate) The required details for SAX2.0-based XMLReader creation.- Parameters:
validate- whether to validate against the DocType- See Also:
-
XMLReaderSAX2Factory
The required details for SAX2.0-based XMLReader creation.- Parameters:
validate- whether to validate against the DocTypesaxdriver- The SAX2.0 Driver classname (null to use the SAX2.0 default parser searching algorithm - if you specify null you should probably be using JAXP anyway).- See Also:
-
-
Method Details
-
createXMLReader
Description copied from interface:XMLReaderJDOMFactoryReturn 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 bySAXBuilder.- Specified by:
createXMLReaderin interfaceXMLReaderJDOMFactory- Returns:
- a new XMLReader
- Throws:
JDOMException- if an XMLReader was not available.
-
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:XMLReaderJDOMFactoryDoes an XMLReader from this factory do more than just well-formed checks.- Specified by:
isValidatingin interfaceXMLReaderJDOMFactory- Returns:
- true if the XMLReader validates
-