Package org.jaxen.saxpath.helpers
Class XPathReaderFactory
java.lang.Object
org.jaxen.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
.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XPathReader
Create anXPathReader
using the value of theorg.saxpath.driver
system property.static XPathReader
createReader
(String className) Create anXPathReader
using the passed in class name.
-
Field Details
-
DRIVER_PROPERTY
Theorg.saxpath.driver
property name.- See Also:
-
DEFAULT_DRIVER
The default driver to use if none is configured.- See Also:
-
-
Constructor Details
-
XPathReaderFactory
private XPathReaderFactory()
-
-
Method Details
-
createReader
Create anXPathReader
using the value of theorg.saxpath.driver
system property.- Returns:
- an instance of the
XPathReader
specified by theorg.saxpath.driver
property - Throws:
SAXPathException
- if the property is not set, or if the class can not be instantiated for some reason, or if the class doesn't implement theXPathReader
interface
-
createReader
Create anXPathReader
using the passed in class name.- Parameters:
className
- the name of the class that implements theXPathReader
interface.- Returns:
- an XPathReader
- Throws:
SAXPathException
- if the class cannot be instantiated for some reason, or if the class doesn't implement theXPathReader
interface
-