| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
| <!--NewPage-->
|
| <HTML>
|
| <HEAD>
|
| <!-- Generated by javadoc on Thu Nov 22 17:13:00 EST 2007 -->
|
| <TITLE>
|
| Xalan-Java 2.7.1: Interface XMLReader
|
| </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> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/XMLReader.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
| </TR>
|
| </TABLE>
|
| </TD>
|
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
| </EM>
|
| </TD>
|
| </TR>
|
|
|
| <TR>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../org/xml/sax/XMLFilter.html"><B>PREV CLASS</B></A>
|
| NEXT CLASS</FONT></TD>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
| <A HREF="XMLReader.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
| </TR>
|
| <TR>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
| </TR>
|
| </TABLE>
|
| <!-- =========== END OF NAVBAR =========== -->
|
|
|
| <HR>
|
| <!-- ======== START OF CLASS DATA ======== -->
|
| <H2>
|
| <FONT SIZE="-1">
|
| org.xml.sax</FONT>
|
| <BR>
|
| Interface XMLReader</H2>
|
| <DL>
|
| <DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../org/xml/sax/XMLFilter.html">XMLFilter</A></DD>
|
| </DL>
|
| <DL>
|
| <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../org/apache/xalan/xsltc/trax/DOM2SAX.html">DOM2SAX</A>, <A HREF="../../../org/apache/xalan/xsltc/trax/DOM2TO.html">DOM2TO</A>, <A HREF="../../../org/xml/sax/helpers/ParserAdapter.html">ParserAdapter</A></DD>
|
| </DL>
|
| <HR>
|
| <DL>
|
| <DT>public interface <B>XMLReader</B></DL>
|
|
|
| <P>
|
| Interface for reading an XML document using callbacks. |
| |
| <blockquote> |
| <em>This module, both source code and documentation, is in the |
| Public Domain, and comes with <strong>NO WARRANTY</strong>.</em> |
| See <a href='http://www.saxproject.org'>http://www.saxproject.org</a> |
| for further information. |
| </blockquote> |
| |
| <p><strong>Note:</strong> despite its name, this interface does |
| <em>not</em> extend the standard Java Reader |
| interface, because reading XML is a fundamentally different activity |
| than reading character data.</p> |
| |
| <p>XMLReader is the interface that an XML parser's SAX2 driver must |
| implement. This interface allows an application to set and |
| query features and properties in the parser, to register |
| event handlers for document processing, and to initiate |
| a document parse.</p> |
| |
| <p>All SAX interfaces are assumed to be synchronous: the |
| <A HREF="../../../org/xml/sax/XMLReader.html#parse(org.xml.sax.InputSource)">parse</A> methods must not return until parsing |
| is complete, and readers must wait for an event-handler callback |
| to return before reporting the next event.</p> |
| |
| <p>This interface replaces the (now deprecated) SAX 1.0 <A HREF="../../../org/xml/sax/Parser.html">Parser</A> interface. The XMLReader interface |
| contains two important enhancements over the old Parser |
| interface (as well as some minor ones):</p> |
| |
| <ol> |
| <li>it adds a standard way to query and set features and |
| properties; and</li> |
| <li>it adds Namespace support, which is required for many |
| higher-level XML standards.</li> |
| </ol> |
| |
| <p>There are adapters available to convert a SAX1 Parser to |
| a SAX2 XMLReader and vice-versa.</p>
|
| <P>
|
| <DL>
|
| <DT><B>Since: </B><DD>SAX 2.0</DD>
|
| <DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLFilter.html"><CODE>XMLFilter</CODE></A>,
|
| <A HREF="../../../org/xml/sax/helpers/ParserAdapter.html"><CODE>ParserAdapter</CODE></A>,
|
| <A HREF="../../../org/xml/sax/helpers/XMLReaderAdapter.html"><CODE>XMLReaderAdapter</CODE></A></DL>
|
| <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> <A HREF="../../../org/xml/sax/ContentHandler.html">ContentHandler</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../org/xml/sax/XMLReader.html#getContentHandler()">getContentHandler</A></B>()</CODE>
|
|
|
| <BR>
|
| Return the current content handler.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> <A HREF="../../../org/xml/sax/DTDHandler.html">DTDHandler</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../org/xml/sax/XMLReader.html#getDTDHandler()">getDTDHandler</A></B>()</CODE>
|
|
|
| <BR>
|
| Return the current DTD handler.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> <A HREF="../../../org/xml/sax/EntityResolver.html">EntityResolver</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../org/xml/sax/XMLReader.html#getEntityResolver()">getEntityResolver</A></B>()</CODE>
|
|
|
| <BR>
|
| Return the current entity resolver.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> <A HREF="../../../org/xml/sax/ErrorHandler.html">ErrorHandler</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../org/xml/sax/XMLReader.html#getErrorHandler()">getErrorHandler</A></B>()</CODE>
|
|
|
| <BR>
|
| Return the current error handler.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> boolean</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../org/xml/sax/XMLReader.html#getFeature(java.lang.String)">getFeature</A></B>(java.lang.String name)</CODE>
|
|
|
| <BR>
|
| Look up the value of a feature flag.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> java.lang.Object</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../org/xml/sax/XMLReader.html#getProperty(java.lang.String)">getProperty</A></B>(java.lang.String name)</CODE>
|
|
|
| <BR>
|
| Look up the value of a property.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../org/xml/sax/XMLReader.html#parse(org.xml.sax.InputSource)">parse</A></B>(<A HREF="../../../org/xml/sax/InputSource.html">InputSource</A> input)</CODE>
|
|
|
| <BR>
|
| Parse an XML document.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../org/xml/sax/XMLReader.html#parse(java.lang.String)">parse</A></B>(java.lang.String systemId)</CODE>
|
|
|
| <BR>
|
| Parse an XML document from a system identifier (URI).</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../org/xml/sax/XMLReader.html#setContentHandler(org.xml.sax.ContentHandler)">setContentHandler</A></B>(<A HREF="../../../org/xml/sax/ContentHandler.html">ContentHandler</A> handler)</CODE>
|
|
|
| <BR>
|
| Allow an application to register a content event handler.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../org/xml/sax/XMLReader.html#setDTDHandler(org.xml.sax.DTDHandler)">setDTDHandler</A></B>(<A HREF="../../../org/xml/sax/DTDHandler.html">DTDHandler</A> handler)</CODE>
|
|
|
| <BR>
|
| Allow an application to register a DTD event handler.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../org/xml/sax/XMLReader.html#setEntityResolver(org.xml.sax.EntityResolver)">setEntityResolver</A></B>(<A HREF="../../../org/xml/sax/EntityResolver.html">EntityResolver</A> resolver)</CODE>
|
|
|
| <BR>
|
| Allow an application to register an entity resolver.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../org/xml/sax/XMLReader.html#setErrorHandler(org.xml.sax.ErrorHandler)">setErrorHandler</A></B>(<A HREF="../../../org/xml/sax/ErrorHandler.html">ErrorHandler</A> handler)</CODE>
|
|
|
| <BR>
|
| Allow an application to register an error event handler.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../org/xml/sax/XMLReader.html#setFeature(java.lang.String, boolean)">setFeature</A></B>(java.lang.String name, |
| boolean value)</CODE>
|
|
|
| <BR>
|
| Set the value of a feature flag.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../org/xml/sax/XMLReader.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A></B>(java.lang.String name, |
| java.lang.Object value)</CODE>
|
|
|
| <BR>
|
| Set the value of a property.</TD>
|
| </TR>
|
| </TABLE>
|
|
|
| <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="getFeature(java.lang.String)"><!-- --></A><H3>
|
| getFeature</H3>
|
| <PRE>
|
| public boolean <B>getFeature</B>(java.lang.String name) |
| throws <A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A>, |
| <A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A></PRE>
|
| <DL>
|
| <DD>Look up the value of a feature flag. |
| |
| <p>The feature name is any fully-qualified URI. It is |
| possible for an XMLReader to recognize a feature name but |
| temporarily be unable to return its value. |
| Some feature values may be available only in specific |
| contexts, such as before, during, or after a parse. |
| Also, some feature values may not be programmatically accessible. |
| (In the case of an adapter for SAX1 <A HREF="../../../org/xml/sax/Parser.html"><CODE>Parser</CODE></A>, there is no |
| implementation-independent way to expose whether the underlying |
| parser is performing validation, expanding external entities, |
| and so forth.) </p> |
| |
| <p>All XMLReaders are required to recognize the |
| http://xml.org/sax/features/namespaces and the |
| http://xml.org/sax/features/namespace-prefixes feature names.</p> |
| |
| <p>Typical usage is something like this:</p> |
| |
| <pre> |
| XMLReader r = new MySAXDriver(); |
| |
| // try to activate validation |
| try { |
| r.setFeature("http://xml.org/sax/features/validation", true); |
| } catch (SAXException e) { |
| System.err.println("Cannot activate validation."); |
| } |
| |
| // register event handlers |
| r.setContentHandler(new MyContentHandler()); |
| r.setErrorHandler(new MyErrorHandler()); |
| |
| // parse the first document |
| try { |
| r.parse("http://www.foo.com/mydoc.xml"); |
| } catch (IOException e) { |
| System.err.println("I/O exception reading XML document"); |
| } catch (SAXException e) { |
| System.err.println("XML exception reading document."); |
| } |
| </pre> |
| |
| <p>Implementors are free (and encouraged) to invent their own features, |
| using names built on their own URIs.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - The feature name, which is a fully-qualified URI.<DT><B>Returns:</B><DD>The current value of the feature (true or false).<DT><B>Throws:</B><DD><A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A> - If the feature |
| value can't be assigned or retrieved.<DD><A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A> - When the |
| XMLReader recognizes the feature name but |
| cannot determine its value at this time.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLReader.html#setFeature(java.lang.String, boolean)"><CODE>setFeature(java.lang.String, boolean)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="setFeature(java.lang.String, boolean)"><!-- --></A><H3>
|
| setFeature</H3>
|
| <PRE>
|
| public void <B>setFeature</B>(java.lang.String name, |
| boolean value) |
| throws <A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A>, |
| <A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A></PRE>
|
| <DL>
|
| <DD>Set the value of a feature flag. |
| |
| <p>The feature name is any fully-qualified URI. It is |
| possible for an XMLReader to expose a feature value but |
| to be unable to change the current value. |
| Some feature values may be immutable or mutable only |
| in specific contexts, such as before, during, or after |
| a parse.</p> |
| |
| <p>All XMLReaders are required to support setting |
| http://xml.org/sax/features/namespaces to true and |
| http://xml.org/sax/features/namespace-prefixes to false.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - The feature name, which is a fully-qualified URI.<DD><CODE>value</CODE> - The requested value of the feature (true or false).<DT><B>Throws:</B><DD><A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A> - If the feature |
| value can't be assigned or retrieved.<DD><A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A> - When the |
| XMLReader recognizes the feature name but |
| cannot set the requested value.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLReader.html#getFeature(java.lang.String)"><CODE>getFeature(java.lang.String)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getProperty(java.lang.String)"><!-- --></A><H3>
|
| getProperty</H3>
|
| <PRE>
|
| public java.lang.Object <B>getProperty</B>(java.lang.String name) |
| throws <A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A>, |
| <A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A></PRE>
|
| <DL>
|
| <DD>Look up the value of a property. |
| |
| <p>The property name is any fully-qualified URI. It is |
| possible for an XMLReader to recognize a property name but |
| temporarily be unable to return its value. |
| Some property values may be available only in specific |
| contexts, such as before, during, or after a parse.</p> |
| |
| <p>XMLReaders are not required to recognize any specific |
| property names, though an initial core set is documented for |
| SAX2.</p> |
| |
| <p>Implementors are free (and encouraged) to invent their own properties, |
| using names built on their own URIs.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - The property name, which is a fully-qualified URI.<DT><B>Returns:</B><DD>The current value of the property.<DT><B>Throws:</B><DD><A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A> - If the property |
| value can't be assigned or retrieved.<DD><A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A> - When the |
| XMLReader recognizes the property name but |
| cannot determine its value at this time.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLReader.html#setProperty(java.lang.String, java.lang.Object)"><CODE>setProperty(java.lang.String, java.lang.Object)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="setProperty(java.lang.String, java.lang.Object)"><!-- --></A><H3>
|
| setProperty</H3>
|
| <PRE>
|
| public void <B>setProperty</B>(java.lang.String name, |
| java.lang.Object value) |
| throws <A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A>, |
| <A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A></PRE>
|
| <DL>
|
| <DD>Set the value of a property. |
| |
| <p>The property name is any fully-qualified URI. It is |
| possible for an XMLReader to recognize a property name but |
| to be unable to change the current value. |
| Some property values may be immutable or mutable only |
| in specific contexts, such as before, during, or after |
| a parse.</p> |
| |
| <p>XMLReaders are not required to recognize setting |
| any specific property names, though a core set is defined by |
| SAX2.</p> |
| |
| <p>This method is also the standard mechanism for setting |
| extended handlers.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - The property name, which is a fully-qualified URI.<DD><CODE>value</CODE> - The requested value for the property.<DT><B>Throws:</B><DD><A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A> - If the property |
| value can't be assigned or retrieved.<DD><A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A> - When the |
| XMLReader recognizes the property name but |
| cannot set the requested value.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="setEntityResolver(org.xml.sax.EntityResolver)"><!-- --></A><H3>
|
| setEntityResolver</H3>
|
| <PRE>
|
| public void <B>setEntityResolver</B>(<A HREF="../../../org/xml/sax/EntityResolver.html">EntityResolver</A> resolver)</PRE>
|
| <DL>
|
| <DD>Allow an application to register an entity resolver. |
| |
| <p>If the application does not register an entity resolver, |
| the XMLReader will perform its own default resolution.</p> |
| |
| <p>Applications may register a new or different resolver in the |
| middle of a parse, and the SAX parser must begin using the new |
| resolver immediately.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>resolver</CODE> - The entity resolver.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLReader.html#getEntityResolver()"><CODE>getEntityResolver()</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getEntityResolver()"><!-- --></A><H3>
|
| getEntityResolver</H3>
|
| <PRE>
|
| public <A HREF="../../../org/xml/sax/EntityResolver.html">EntityResolver</A> <B>getEntityResolver</B>()</PRE>
|
| <DL>
|
| <DD>Return the current entity resolver.<DD><DL>
|
| <DT><B>Returns:</B><DD>The current entity resolver, or null if none |
| has been registered.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLReader.html#setEntityResolver(org.xml.sax.EntityResolver)"><CODE>setEntityResolver(org.xml.sax.EntityResolver)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="setDTDHandler(org.xml.sax.DTDHandler)"><!-- --></A><H3>
|
| setDTDHandler</H3>
|
| <PRE>
|
| public void <B>setDTDHandler</B>(<A HREF="../../../org/xml/sax/DTDHandler.html">DTDHandler</A> handler)</PRE>
|
| <DL>
|
| <DD>Allow an application to register a DTD event handler. |
| |
| <p>If the application does not register a DTD handler, all DTD |
| events reported by the SAX parser will be silently ignored.</p> |
| |
| <p>Applications may register a new or different handler in the |
| middle of a parse, and the SAX parser must begin using the new |
| handler immediately.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>handler</CODE> - The DTD handler.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLReader.html#getDTDHandler()"><CODE>getDTDHandler()</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getDTDHandler()"><!-- --></A><H3>
|
| getDTDHandler</H3>
|
| <PRE>
|
| public <A HREF="../../../org/xml/sax/DTDHandler.html">DTDHandler</A> <B>getDTDHandler</B>()</PRE>
|
| <DL>
|
| <DD>Return the current DTD handler.<DD><DL>
|
| <DT><B>Returns:</B><DD>The current DTD handler, or null if none |
| has been registered.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLReader.html#setDTDHandler(org.xml.sax.DTDHandler)"><CODE>setDTDHandler(org.xml.sax.DTDHandler)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="setContentHandler(org.xml.sax.ContentHandler)"><!-- --></A><H3>
|
| setContentHandler</H3>
|
| <PRE>
|
| public void <B>setContentHandler</B>(<A HREF="../../../org/xml/sax/ContentHandler.html">ContentHandler</A> handler)</PRE>
|
| <DL>
|
| <DD>Allow an application to register a content event handler. |
| |
| <p>If the application does not register a content handler, all |
| content events reported by the SAX parser will be silently |
| ignored.</p> |
| |
| <p>Applications may register a new or different handler in the |
| middle of a parse, and the SAX parser must begin using the new |
| handler immediately.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>handler</CODE> - The content handler.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLReader.html#getContentHandler()"><CODE>getContentHandler()</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getContentHandler()"><!-- --></A><H3>
|
| getContentHandler</H3>
|
| <PRE>
|
| public <A HREF="../../../org/xml/sax/ContentHandler.html">ContentHandler</A> <B>getContentHandler</B>()</PRE>
|
| <DL>
|
| <DD>Return the current content handler.<DD><DL>
|
| <DT><B>Returns:</B><DD>The current content handler, or null if none |
| has been registered.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLReader.html#setContentHandler(org.xml.sax.ContentHandler)"><CODE>setContentHandler(org.xml.sax.ContentHandler)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="setErrorHandler(org.xml.sax.ErrorHandler)"><!-- --></A><H3>
|
| setErrorHandler</H3>
|
| <PRE>
|
| public void <B>setErrorHandler</B>(<A HREF="../../../org/xml/sax/ErrorHandler.html">ErrorHandler</A> handler)</PRE>
|
| <DL>
|
| <DD>Allow an application to register an error event handler. |
| |
| <p>If the application does not register an error handler, all |
| error events reported by the SAX parser will be silently |
| ignored; however, normal processing may not continue. It is |
| highly recommended that all SAX applications implement an |
| error handler to avoid unexpected bugs.</p> |
| |
| <p>Applications may register a new or different handler in the |
| middle of a parse, and the SAX parser must begin using the new |
| handler immediately.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>handler</CODE> - The error handler.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLReader.html#getErrorHandler()"><CODE>getErrorHandler()</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getErrorHandler()"><!-- --></A><H3>
|
| getErrorHandler</H3>
|
| <PRE>
|
| public <A HREF="../../../org/xml/sax/ErrorHandler.html">ErrorHandler</A> <B>getErrorHandler</B>()</PRE>
|
| <DL>
|
| <DD>Return the current error handler.<DD><DL>
|
| <DT><B>Returns:</B><DD>The current error handler, or null if none |
| has been registered.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLReader.html#setErrorHandler(org.xml.sax.ErrorHandler)"><CODE>setErrorHandler(org.xml.sax.ErrorHandler)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="parse(org.xml.sax.InputSource)"><!-- --></A><H3>
|
| parse</H3>
|
| <PRE>
|
| public void <B>parse</B>(<A HREF="../../../org/xml/sax/InputSource.html">InputSource</A> input) |
| throws java.io.IOException, |
| <A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></PRE>
|
| <DL>
|
| <DD>Parse an XML document. |
| |
| <p>The application can use this method to instruct the XML |
| reader to begin parsing an XML document from any valid input |
| source (a character stream, a byte stream, or a URI).</p> |
| |
| <p>Applications may not invoke this method while a parse is in |
| progress (they should create a new XMLReader instead for each |
| nested XML document). Once a parse is complete, an |
| application may reuse the same XMLReader object, possibly with a |
| different input source. |
| Configuration of the XMLReader object (such as handler bindings and |
| values established for feature flags and properties) is unchanged |
| by completion of a parse, unless the definition of that aspect of |
| the configuration explicitly specifies other behavior. |
| (For example, feature flags or properties exposing |
| characteristics of the document being parsed.) |
| </p> |
| |
| <p>During the parse, the XMLReader will provide information |
| about the XML document through the registered event |
| handlers.</p> |
| |
| <p>This method is synchronous: it will not return until parsing |
| has ended. If a client application wants to terminate |
| parsing early, it should throw an exception.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>input</CODE> - The input source for the top-level of the |
| XML document.<DT><B>Throws:</B><DD><A HREF="../../../org/xml/sax/SAXException.html">SAXException</A> - Any SAX exception, possibly |
| wrapping another exception.<DD>java.io.IOException - An IO exception from the parser, |
| possibly from a byte stream or character stream |
| supplied by the application.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/InputSource.html"><CODE>InputSource</CODE></A>,
|
| <A HREF="../../../org/xml/sax/XMLReader.html#parse(java.lang.String)"><CODE>parse(java.lang.String)</CODE></A>,
|
| <A HREF="../../../org/xml/sax/XMLReader.html#setEntityResolver(org.xml.sax.EntityResolver)"><CODE>setEntityResolver(org.xml.sax.EntityResolver)</CODE></A>,
|
| <A HREF="../../../org/xml/sax/XMLReader.html#setDTDHandler(org.xml.sax.DTDHandler)"><CODE>setDTDHandler(org.xml.sax.DTDHandler)</CODE></A>,
|
| <A HREF="../../../org/xml/sax/XMLReader.html#setContentHandler(org.xml.sax.ContentHandler)"><CODE>setContentHandler(org.xml.sax.ContentHandler)</CODE></A>,
|
| <A HREF="../../../org/xml/sax/XMLReader.html#setErrorHandler(org.xml.sax.ErrorHandler)"><CODE>setErrorHandler(org.xml.sax.ErrorHandler)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="parse(java.lang.String)"><!-- --></A><H3>
|
| parse</H3>
|
| <PRE>
|
| public void <B>parse</B>(java.lang.String systemId) |
| throws java.io.IOException, |
| <A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></PRE>
|
| <DL>
|
| <DD>Parse an XML document from a system identifier (URI). |
| |
| <p>This method is a shortcut for the common case of reading a |
| document from a system identifier. It is the exact |
| equivalent of the following:</p> |
| |
| <pre> |
| parse(new InputSource(systemId)); |
| </pre> |
| |
| <p>If the system identifier is a URL, it must be fully resolved |
| by the application before it is passed to the parser.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>systemId</CODE> - The system identifier (URI).<DT><B>Throws:</B><DD><A HREF="../../../org/xml/sax/SAXException.html">SAXException</A> - Any SAX exception, possibly |
| wrapping another exception.<DD>java.io.IOException - An IO exception from the parser, |
| possibly from a byte stream or character stream |
| supplied by the application.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/XMLReader.html#parse(org.xml.sax.InputSource)"><CODE>parse(org.xml.sax.InputSource)</CODE></A></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> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/XMLReader.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
| </TR>
|
| </TABLE>
|
| </TD>
|
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
| </EM>
|
| </TD>
|
| </TR>
|
|
|
| <TR>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../org/xml/sax/XMLFilter.html"><B>PREV CLASS</B></A>
|
| NEXT CLASS</FONT></TD>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
| <A HREF="XMLReader.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
| </TR>
|
| <TR>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
| </TR>
|
| </TABLE>
|
| <!-- =========== END OF NAVBAR =========== -->
|
|
|
| <HR>
|
| Copyright © 2006 Apache XML Project. All Rights Reserved.
|
| </BODY>
|
| </HTML>
|