Package org.saxpath.helpers
Class XPathReaderFactory
- java.lang.Object
-
- org.saxpath.helpers.XPathReaderFactory
-
public class XPathReaderFactory extends java.lang.Object
Create anXPathReader
from either a system property, or a named class.Similar to the SAX API, the
XPathReaderFactory
can create anXPathReader
from a name of a class passed in directly, or by inspecting the system propertyorg.saxpath.driver
.- Author:
- bob mcwhirter (bob@werken.com)
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
DEFAULT_DRIVER
The default driver to use if none is configured.static java.lang.String
DRIVER_PROPERTY
Theorg.saxpath.driver
property name.
-
Constructor Summary
Constructors Constructor Description XPathReaderFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static XPathReader
createReader()
Create anXPathReader
using the value of theorg.saxpath.driver
system property.static XPathReader
createReader(java.lang.String className)
Create anXPathReader
using the passed in class name.
-
-
-
Field Detail
-
DRIVER_PROPERTY
public static final java.lang.String DRIVER_PROPERTY
Theorg.saxpath.driver
property name.- See Also:
- Constant Field Values
-
DEFAULT_DRIVER
protected static final java.lang.String DEFAULT_DRIVER
The default driver to use if none is configured.- See Also:
- Constant Field Values
-
-
Method Detail
-
createReader
public static XPathReader createReader() throws SAXPathException
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 unset, or if the class can not be instantiated for some reason., or if the class doesn't implement theXPathReader
interface.
-
createReader
public static XPathReader createReader(java.lang.String className) throws SAXPathException
Create anXPathReader
using the passed in class name.- Parameters:
className
- The name of the class which implements theXPathReader
interface.- Throws:
SAXPathException
- if the class can not be instantiated for some reason, or if the class doesn't implement theXPathReader
interface.
-
-