blob: 6e9694f3063f6a6be54f62efde6b12315d7bdc99 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Nov 22 17:12:53 EST 2007 -->
<TITLE>
Xalan-Java 2.7.1: Class SAXParserFactory
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SAXParserFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/xml/parsers/SAXParser.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="SAXParserFactory.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.xml.parsers</FONT>
<BR>
Class SAXParserFactory</H2>
<PRE>
java.lang.Object
|
+--<B>javax.xml.parsers.SAXParserFactory</B>
</PRE>
<HR>
<DL>
<DT>public abstract class <B>SAXParserFactory</B><DT>extends java.lang.Object</DL>
<P>
Defines a factory API that enables applications to configure and
obtain a SAX based parser to parse XML documents.
<P>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/parsers/SAXParserFactory.html#getFeature(java.lang.String)">getFeature</A></B>(java.lang.String&nbsp;name)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the particular property requested for in the underlying
implementation of org.xml.sax.XMLReader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../javax/xml/validation/Schema.html">Schema</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/parsers/SAXParserFactory.html#getSchema()">getSchema</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> object specified through
the <A HREF="../../../javax/xml/parsers/SAXParserFactory.html#setSchema(javax.xml.validation.Schema)"><CODE>setSchema(Schema schema)</CODE></A> method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/parsers/SAXParserFactory.html#isNamespaceAware()">isNamespaceAware</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates whether or not the factory is configured to produce
parsers which are namespace aware.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/parsers/SAXParserFactory.html#isValidating()">isValidating</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates whether or not the factory is configured to produce
parsers which validate the XML content during parse.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/parsers/SAXParserFactory.html#isXIncludeAware()">isXIncludeAware</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get state of XInclude processing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../javax/xml/parsers/SAXParserFactory.html">SAXParserFactory</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/parsers/SAXParserFactory.html#newInstance()">newInstance</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtain a new instance of a <code>SAXParserFactory</code>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract &nbsp;<A HREF="../../../javax/xml/parsers/SAXParser.html">SAXParser</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/parsers/SAXParserFactory.html#newSAXParser()">newSAXParser</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new instance of a SAXParser using the currently
configured factory parameters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/parsers/SAXParserFactory.html#setFeature(java.lang.String, boolean)">setFeature</A></B>(java.lang.String&nbsp;name,
boolean&nbsp;value)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the particular feature in the underlying implementation of
org.xml.sax.XMLReader.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/parsers/SAXParserFactory.html#setNamespaceAware(boolean)">setNamespaceAware</A></B>(boolean&nbsp;awareness)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that the parser produced by this code will
provide support for XML namespaces.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/parsers/SAXParserFactory.html#setSchema(javax.xml.validation.Schema)">setSchema</A></B>(<A HREF="../../../javax/xml/validation/Schema.html">Schema</A>&nbsp;schema)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> to be used by parsers created
from this factory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/parsers/SAXParserFactory.html#setValidating(boolean)">setValidating</A></B>(boolean&nbsp;validating)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that the parser produced by this code will
validate documents as they are parsed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/xml/parsers/SAXParserFactory.html#setXIncludeAware(boolean)">setXIncludeAware</A></B>(boolean&nbsp;state)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set state of XInclude processing.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="newInstance()"><!-- --></A><H3>
newInstance</H3>
<PRE>
public static <A HREF="../../../javax/xml/parsers/SAXParserFactory.html">SAXParserFactory</A> <B>newInstance</B>()</PRE>
<DL>
<DD>Obtain a new instance of a <code>SAXParserFactory</code>. This
static method creates a new factory instance
This method uses the following ordered lookup procedure to determine
the <code>SAXParserFactory</code> implementation class to
load:
<ul>
<li>
Use the <code>javax.xml.parsers.SAXParserFactory</code> system
property.
</li>
<li>
Use the properties file "lib/jaxp.properties" in the JRE directory.
This configuration file is in standard <code>java.util.Properties
</code> format and contains the fully qualified name of the
implementation class with the key being the system property defined
above.
The jaxp.properties file is read only once by the JAXP implementation
and it's values are then cached for future use. If the file does not exist
when the first attempt is made to read from it, no further attempts are
made to check for its existence. It is not possible to change the value
of any property in jaxp.properties after it has been read for the first time.
</li>
<li>
Use the Services API (as detailed in the JAR specification), if
available, to determine the classname. The Services API will look
for a classname in the file
<code>META-INF/services/javax.xml.parsers.SAXParserFactory</code>
in jars available to the runtime.
</li>
<li>
Platform default <code>SAXParserFactory</code> instance.
</li>
</ul>
Once an application has obtained a reference to a
<code>SAXParserFactory</code> it can use the factory to
configure and obtain parser instances.
<h2>Tip for Trouble-shooting</h2>
<p>Setting the <code>jaxp.debug</code> system property will cause
this method to print a lot of debug messages
to <tt>System.err</tt> about what it is doing and where it is looking at.</p>
<p> If you have problems loading <A HREF="../../../javax/xml/parsers/DocumentBuilder.html"><CODE>DocumentBuilder</CODE></A>s, try:</p>
<pre>
java -Djaxp.debug=1 YourProgram ....
</pre><DD><DL>
<DT><B>Returns:</B><DD>A new instance of a SAXParserFactory.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/parsers/FactoryConfigurationError.html">FactoryConfigurationError</A> - if the implementation is
not available or cannot be instantiated.</DL>
</DD>
</DL>
<HR>
<A NAME="newSAXParser()"><!-- --></A><H3>
newSAXParser</H3>
<PRE>
public abstract <A HREF="../../../javax/xml/parsers/SAXParser.html">SAXParser</A> <B>newSAXParser</B>()
throws <A HREF="../../../javax/xml/parsers/ParserConfigurationException.html">ParserConfigurationException</A>,
<A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></PRE>
<DL>
<DD><p>Creates a new instance of a SAXParser using the currently
configured factory parameters.</p><DD><DL>
<DT><B>Returns:</B><DD>A new instance of a SAXParser.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/parsers/ParserConfigurationException.html">ParserConfigurationException</A> - if a parser cannot
be created which satisfies the requested configuration.<DD><A HREF="../../../org/xml/sax/SAXException.html">SAXException</A> - for SAX errors.</DL>
</DD>
</DL>
<HR>
<A NAME="setNamespaceAware(boolean)"><!-- --></A><H3>
setNamespaceAware</H3>
<PRE>
public void <B>setNamespaceAware</B>(boolean&nbsp;awareness)</PRE>
<DL>
<DD>Specifies that the parser produced by this code will
provide support for XML namespaces. By default the value of this is set
to <code>false</code>.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>awareness</CODE> - true if the parser produced by this code will
provide support for XML namespaces; false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="setValidating(boolean)"><!-- --></A><H3>
setValidating</H3>
<PRE>
public void <B>setValidating</B>(boolean&nbsp;validating)</PRE>
<DL>
<DD>Specifies that the parser produced by this code will
validate documents as they are parsed. By default the value of this is
set to <code>false</code>.
<p>
Note that "the validation" here means
<a href="http://www.w3.org/TR/REC-xml#proc-types">a validating
parser</a> as defined in the XML recommendation.
In other words, it essentially just controls the DTD validation.
(except the legacy two properties defined in JAXP 1.2.
See <a href="#validationCompatibility">here</a> for more details.)
</p>
<p>
To use modern schema languages such as W3C XML Schema or
RELAX NG instead of DTD, you can configure your parser to be
a non-validating parser by leaving the <A HREF="../../../javax/xml/parsers/SAXParserFactory.html#setValidating(boolean)"><CODE>setValidating(boolean)</CODE></A>
method <tt>false</tt>, then use the <A HREF="../../../javax/xml/parsers/SAXParserFactory.html#setSchema(javax.xml.validation.Schema)"><CODE>setSchema(Schema)</CODE></A>
method to associate a schema to a parser.
</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>validating</CODE> - true if the parser produced by this code will
validate documents as they are parsed; false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="isNamespaceAware()"><!-- --></A><H3>
isNamespaceAware</H3>
<PRE>
public boolean <B>isNamespaceAware</B>()</PRE>
<DL>
<DD>Indicates whether or not the factory is configured to produce
parsers which are namespace aware.<DD><DL>
<DT><B>Returns:</B><DD>true if the factory is configured to produce
parsers which are namespace aware; false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="isValidating()"><!-- --></A><H3>
isValidating</H3>
<PRE>
public boolean <B>isValidating</B>()</PRE>
<DL>
<DD>Indicates whether or not the factory is configured to produce
parsers which validate the XML content during parse.<DD><DL>
<DT><B>Returns:</B><DD>true if the factory is configured to produce parsers which validate
the XML content during parse; false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="setFeature(java.lang.String, boolean)"><!-- --></A><H3>
setFeature</H3>
<PRE>
public abstract void <B>setFeature</B>(java.lang.String&nbsp;name,
boolean&nbsp;value)
throws <A HREF="../../../javax/xml/parsers/ParserConfigurationException.html">ParserConfigurationException</A>,
<A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A>,
<A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A></PRE>
<DL>
<DD><p>Sets the particular feature in the underlying implementation of
org.xml.sax.XMLReader.
A list of the core features and properties can be found at
<a href="http://www.saxproject.org/">http://www.saxproject.org/</a></p>
<p>All implementations are required to support the <A HREF="../../../javax/xml/XMLConstants.html#FEATURE_SECURE_PROCESSING"><CODE>XMLConstants.FEATURE_SECURE_PROCESSING</CODE></A> feature.
When the feature is</p>
<ul>
<li>
<code>true</code>: the implementation will limit XML processing to conform to implementation limits.
Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources.
If XML processing is limited for security reasons, it will be reported via a call to the registered
<A HREF="../../../org/xml/sax/ErrorHandler.html#fatalError(org.xml.sax.SAXParseException)"><CODE>ErrorHandler.fatalError(SAXParseException exception)</CODE></A>.
See <A HREF="../../../javax/xml/parsers/SAXParser.html"><CODE>SAXParser</CODE></A> <code>parse</code> methods for handler specification.
</li>
<li>
When the feature is <code>false</code>, the implementation will processing XML according to the XML specifications without
regard to possible implementation limits.
</li>
</ul><DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the feature to be set.<DD><CODE>value</CODE> - The value of the feature to be set.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/parsers/ParserConfigurationException.html">ParserConfigurationException</A> - if a parser cannot
be created which satisfies the requested configuration.<DD><A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A> - When the underlying XMLReader does
not recognize the property name.<DD><A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A> - When the underlying XMLReader
recognizes the property name but doesn't support the
property.<DD>java.lang.NullPointerException - If the <code>name</code> parameter is null.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLReader.html#setFeature(java.lang.String, boolean)"><CODE>XMLReader.setFeature(java.lang.String, boolean)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getFeature(java.lang.String)"><!-- --></A><H3>
getFeature</H3>
<PRE>
public abstract boolean <B>getFeature</B>(java.lang.String&nbsp;name)
throws <A HREF="../../../javax/xml/parsers/ParserConfigurationException.html">ParserConfigurationException</A>,
<A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A>,
<A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A></PRE>
<DL>
<DD><p>Returns the particular property requested for in the underlying
implementation of org.xml.sax.XMLReader.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the property to be retrieved.<DT><B>Returns:</B><DD>Value of the requested property.<DT><B>Throws:</B><DD><A HREF="../../../javax/xml/parsers/ParserConfigurationException.html">ParserConfigurationException</A> - if a parser cannot be created which satisfies the requested configuration.<DD><A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A> - When the underlying XMLReader does not recognize the property name.<DD><A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A> - When the underlying XMLReader recognizes the property name but doesn't support the property.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLReader.html#getProperty(java.lang.String)"><CODE>XMLReader.getProperty(java.lang.String)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getSchema()"><!-- --></A><H3>
getSchema</H3>
<PRE>
public <A HREF="../../../javax/xml/validation/Schema.html">Schema</A> <B>getSchema</B>()</PRE>
<DL>
<DD>Gets the <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> object specified through
the <A HREF="../../../javax/xml/parsers/SAXParserFactory.html#setSchema(javax.xml.validation.Schema)"><CODE>setSchema(Schema schema)</CODE></A> method.<DD><DL>
<DT><B>Returns:</B><DD>the <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> object that was last set through
the <A HREF="../../../javax/xml/parsers/SAXParserFactory.html#setSchema(javax.xml.validation.Schema)"><CODE>setSchema(Schema)</CODE></A> method, or null
if the method was not invoked since a <A HREF="../../../javax/xml/parsers/SAXParserFactory.html"><CODE>SAXParserFactory</CODE></A>
is created.<DT><B>Throws:</B><DD>UnsupportedOperationException - For backward compatibility, when implementations for
earlier versions of JAXP is used, this exception will be
thrown.<DT><B>Since: </B><DD>1.5</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setSchema(javax.xml.validation.Schema)"><!-- --></A><H3>
setSchema</H3>
<PRE>
public void <B>setSchema</B>(<A HREF="../../../javax/xml/validation/Schema.html">Schema</A>&nbsp;schema)</PRE>
<DL>
<DD><p>Set the <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> to be used by parsers created
from this factory.</p>
<p>When a <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> is non-null, a parser will use a validator
created from it to validate documents before it passes information
down to the application.</p>
<p>When warnings/errors/fatal errors are found by the validator, the parser must
handle them as if those errors were found by the parser itself.
In other words, if the user-specified <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A>
is set, it must receive those errors, and if not, they must be
treated according to the implementation specific
default error handling rules.
<p>A validator may modify the SAX event stream (for example by
adding default values that were missing in documents), and a parser
is responsible to make sure that the application will receive
those modified event stream.</p>
<p>Initialy, <code>null</code> is set as the <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A>.</p>
<p>This processing will take effect even if
the <A HREF="../../../javax/xml/parsers/SAXParserFactory.html#isValidating()"><CODE>isValidating()</CODE></A> method returns <code>false</code>.
<p>It is an error to use
the <code>http://java.sun.com/xml/jaxp/properties/schemaSource</code>
property and/or the <code>http://java.sun.com/xml/jaxp/properties/schemaLanguage</code>
property in conjunction with a non-null <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> object.
Such configuration will cause a <A HREF="../../../org/xml/sax/SAXException.html"><CODE>SAXException</CODE></A>
exception when those properties are set on a <A HREF="../../../javax/xml/parsers/SAXParser.html"><CODE>SAXParser</CODE></A>.</p>
<h4>Note for implmentors</h4>
<p>
A parser must be able to work with any <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A>
implementation. However, parsers and schemas are allowed
to use implementation-specific custom mechanisms
as long as they yield the result described in the specification.
</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>schema</CODE> - <code>Schema</code> to use, <code>null</code> to remove a schema.<DT><B>Throws:</B><DD>UnsupportedOperationException - For backward compatibility, when implementations for
earlier versions of JAXP is used, this exception will be
thrown.<DT><B>Since: </B><DD>1.5</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setXIncludeAware(boolean)"><!-- --></A><H3>
setXIncludeAware</H3>
<PRE>
public void <B>setXIncludeAware</B>(boolean&nbsp;state)</PRE>
<DL>
<DD><p>Set state of XInclude processing.</p>
<p>If XInclude markup is found in the document instance, should it be
processed as specified in <a href="http://www.w3.org/TR/xinclude/">
XML Inclusions (XInclude) Version 1.0</a>.</p>
<p>XInclude processing defaults to <code>false</code>.</p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>state</CODE> - Set XInclude processing to <code>true</code> or
<code>false</code><DT><B>Throws:</B><DD>UnsupportedOperationException - For backward compatibility, when implementations for
earlier versions of JAXP is used, this exception will be
thrown.<DT><B>Since: </B><DD>1.5</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="isXIncludeAware()"><!-- --></A><H3>
isXIncludeAware</H3>
<PRE>
public boolean <B>isXIncludeAware</B>()</PRE>
<DL>
<DD><p>Get state of XInclude processing.</p><DD><DL>
<DT><B>Returns:</B><DD>current state of XInclude processing<DT><B>Throws:</B><DD>UnsupportedOperationException - For backward compatibility, when implementations for
earlier versions of JAXP is used, this exception will be
thrown.<DT><B>Since: </B><DD>1.5</DD>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SAXParserFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/xml/parsers/SAXParser.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="SAXParserFactory.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
Copyright © 2006 Apache XML Project. All Rights Reserved.
</BODY>
</HTML>