Package org.dom4j.io
Class SAXHelper
- java.lang.Object
-
- org.dom4j.io.SAXHelper
-
class SAXHelper extends java.lang.Object
SAXHelper
contains some helper methods for working with SAX and XMLReader objects.- Version:
- $Revision: 1.18 $
-
-
Field Summary
Fields Modifier and Type Field Description private static boolean
loggedWarning
-
Constructor Summary
Constructors Modifier Constructor Description protected
SAXHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.xml.sax.XMLReader
createXMLReader(boolean validating)
Creats a default XMLReader via the org.xml.sax.driver system property or JAXP if the system property is not set.protected static org.xml.sax.XMLReader
createXMLReaderViaJAXP(boolean validating, boolean namespaceAware)
This method attempts to use JAXP to locate the SAX2 XMLReader implementation.protected static boolean
isVerboseErrorReporting()
static boolean
setParserFeature(org.xml.sax.XMLReader reader, java.lang.String featureName, boolean value)
static boolean
setParserProperty(org.xml.sax.XMLReader reader, java.lang.String propertyName, java.lang.Object value)
-
-
-
Method Detail
-
setParserProperty
public static boolean setParserProperty(org.xml.sax.XMLReader reader, java.lang.String propertyName, java.lang.Object value)
-
setParserFeature
public static boolean setParserFeature(org.xml.sax.XMLReader reader, java.lang.String featureName, boolean value)
-
createXMLReader
public static org.xml.sax.XMLReader createXMLReader(boolean validating) throws org.xml.sax.SAXException
Creats a default XMLReader via the org.xml.sax.driver system property or JAXP if the system property is not set.- Parameters:
validating
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
- Throws:
org.xml.sax.SAXException
- DOCUMENT ME!
-
createXMLReaderViaJAXP
protected static org.xml.sax.XMLReader createXMLReaderViaJAXP(boolean validating, boolean namespaceAware)
This method attempts to use JAXP to locate the SAX2 XMLReader implementation. This method uses reflection to avoid being dependent directly on the JAXP classes.- Parameters:
validating
- DOCUMENT ME!namespaceAware
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
isVerboseErrorReporting
protected static boolean isVerboseErrorReporting()
-
-