SAXReader creates a DOM4J tree from SAX parsing events.
The actual SAX parser that is used by this class is configurable so you can
use your favourite SAX parser if you wish. DOM4J comes configured with its
own SAX parser so you do not need to worry about configuring the SAX parser.
If the parser is not specified explicitly then the standard SAX policy of
using the org.xml.sax.driver system property is used to
determine the implementation class of XMLReader .
If the org.xml.sax.driver system property is not defined then
JAXP is used via reflection (so that DOM4J is not explicitly dependent on the
JAXP classes) to load the JAXP configured SAXParser. If there is any error
creating a JAXP SAXParser an informational message is output and then the
default (Aelfred) SAX parser is used instead.
If you are trying to use JAXP to explicitly set your SAX parser and are
experiencing problems, you can turn on verbose error reporting by defining
the system property org.dom4j.verbose to be "true" which will
output a more detailed description of why JAXP could not find a SAX parser
SAXReadercreates a DOM4J tree from SAX parsing events.The actual SAX parser that is used by this class is configurable so you can use your favourite SAX parser if you wish. DOM4J comes configured with its own SAX parser so you do not need to worry about configuring the SAX parser.
To explicitly configure the SAX parser that is used via Java code you can use a constructor or use the setXMLReader(XMLReader) or setXMLReaderClassName(String) methods.
If the parser is not specified explicitly then the standard SAX policy of using the
org.xml.sax.driversystem property is used to determine the implementation class of XMLReader .If the
org.xml.sax.driversystem property is not defined then JAXP is used via reflection (so that DOM4J is not explicitly dependent on the JAXP classes) to load the JAXP configured SAXParser. If there is any error creating a JAXP SAXParser an informational message is output and then the default (Aelfred) SAX parser is used instead.If you are trying to use JAXP to explicitly set your SAX parser and are experiencing problems, you can turn on verbose error reporting by defining the system property
org.dom4j.verboseto be "true" which will output a more detailed description of why JAXP could not find a SAX parserFor more information on JAXP please go to Sun's Java & XML site