Package org.jaxen.saxpath.helpers
Class XPathReaderFactory
- java.lang.Object
-
- org.jaxen.saxpath.helpers.XPathReaderFactory
-
public class XPathReaderFactory extends Object
Create anXPathReaderfrom either a system property, or a named class.Similar to the SAX API, the
XPathReaderFactorycan create anXPathReaderfrom 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 StringDEFAULT_DRIVERThe default driver to use if none is configured.static StringDRIVER_PROPERTYTheorg.saxpath.driverproperty name.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static XPathReadercreateReader()Create anXPathReaderusing the value of theorg.saxpath.driversystem property.static XPathReadercreateReader(String className)Create anXPathReaderusing the passed in class name.
-
-
-
Field Detail
-
DRIVER_PROPERTY
public static final String DRIVER_PROPERTY
Theorg.saxpath.driverproperty name.- See Also:
- Constant Field Values
-
DEFAULT_DRIVER
protected static final 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 anXPathReaderusing the value of theorg.saxpath.driversystem property.- Returns:
- an instance of the
XPathReaderspecified by theorg.saxpath.driverproperty - 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 theXPathReaderinterface
-
createReader
public static XPathReader createReader(String className) throws SAXPathException
Create anXPathReaderusing the passed in class name.- Parameters:
className- the name of the class that implements theXPathReaderinterface.- Returns:
- an XPathReader
- Throws:
SAXPathException- if the class cannot be instantiated for some reason, or if the class doesn't implement theXPathReaderinterface
-
-