Class XPathReaderFactory
java.lang.Object
org.saxpath.helpers.XPathReaderFactory
Create an
XPathReader from
either a system property, or a named class.
Similar to the SAX API, the XPathReaderFactory
can create an XPathReader from a name of a
class passed in directly, or by inspecting the system
property org.saxpath.driver.
- Author:
- bob mcwhirter (bob@werken.com)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XPathReaderCreate anXPathReaderusing the value of theorg.saxpath.driversystem property.static XPathReadercreateReader(String className) Create anXPathReaderusing the passed in class name.
-
Field Details
-
DRIVER_PROPERTY
-
DEFAULT_DRIVER
The default driver to use if none is configured.- See Also:
-
-
Constructor Details
-
XPathReaderFactory
public XPathReaderFactory()
-
-
Method Details
-
createReader
Create anXPathReaderusing the value of theorg.saxpath.driversystem property.- Returns:
- An instance of the
XPathReaderspecified by theorg.saxpath.driverproperty. - Throws:
SAXPathException- if the property is unset, or if the class can not be instantiated for some reason., or if the class doesn't implement theXPathReaderinterface.
-
createReader
Create anXPathReaderusing the passed in class name.- Parameters:
className- The name of the class which implements theXPathReaderinterface.- Throws:
SAXPathException- if the class can not be instantiated for some reason, or if the class doesn't implement theXPathReaderinterface.
-