📄 saxparser.html
字号:
java.io.IOException</PRE><DL><DD>Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified <A HREF="../../../org/xml/sax/helpers/DefaultHandler.html"><CODE>DefaultHandler</CODE></A>.<DD><DL><DT><B>Parameters:</B><DD><CODE>uri</CODE> - The location of the content to be parsed.<DD><CODE>dh</CODE> - The SAX DefaultHandler to use.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - If any IO errors occur.<DD><CODE>java.lang.IllegalArgumentException</CODE> - If the uri is null.<DD><CODE><A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></CODE> - If the underlying parser throws a SAXException while parsing.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/DocumentHandler.html"><CODE>DocumentHandler</CODE></A></DL></DD></DL><HR><A NAME="parse(java.io.File, org.xml.sax.HandlerBase)"><!-- --></A><H3>parse</H3><PRE>public void <B>parse</B>(java.io.File f, <A HREF="../../../org/xml/sax/HandlerBase.html">HandlerBase</A> hb) throws <A HREF="../../../org/xml/sax/SAXException.html">SAXException</A>, java.io.IOException</PRE><DL><DD>Parse the content of the file specified as XML using the specified <A HREF="../../../org/xml/sax/HandlerBase.html"><CODE>HandlerBase</CODE></A>. <i> Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0</i><DD><DL><DT><B>Parameters:</B><DD><CODE>f</CODE> - The file containing the XML to parse<DD><CODE>hb</CODE> - The SAX HandlerBase to use.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - If any IO errors occur.<DD><CODE>java.lang.IllegalArgumentException</CODE> - If the File object is null.<DD><CODE><A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></CODE> - If the underlying parser throws a SAXException while parsing.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/DocumentHandler.html"><CODE>DocumentHandler</CODE></A></DL></DD></DL><HR><A NAME="parse(java.io.File, org.xml.sax.helpers.DefaultHandler)"><!-- --></A><H3>parse</H3><PRE>public void <B>parse</B>(java.io.File f, <A HREF="../../../org/xml/sax/helpers/DefaultHandler.html">DefaultHandler</A> dh) throws <A HREF="../../../org/xml/sax/SAXException.html">SAXException</A>, java.io.IOException</PRE><DL><DD>Parse the content of the file specified as XML using the specified <A HREF="../../../org/xml/sax/helpers/DefaultHandler.html"><CODE>DefaultHandler</CODE></A>.<DD><DL><DT><B>Parameters:</B><DD><CODE>f</CODE> - The file containing the XML to parse<DD><CODE>dh</CODE> - The SAX DefaultHandler to use.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - If any IO errors occur.<DD><CODE>java.lang.IllegalArgumentException</CODE> - If the File object is null.<DD><CODE><A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></CODE> - If the underlying parser throws a SAXException while parsing.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/DocumentHandler.html"><CODE>DocumentHandler</CODE></A></DL></DD></DL><HR><A NAME="parse(org.xml.sax.InputSource, org.xml.sax.HandlerBase)"><!-- --></A><H3>parse</H3><PRE>public void <B>parse</B>(<A HREF="../../../org/xml/sax/InputSource.html">InputSource</A> is, <A HREF="../../../org/xml/sax/HandlerBase.html">HandlerBase</A> hb) throws <A HREF="../../../org/xml/sax/SAXException.html">SAXException</A>, java.io.IOException</PRE><DL><DD>Parse the content given <A HREF="../../../org/xml/sax/InputSource.html"><CODE>InputSource</CODE></A> as XML using the specified <A HREF="../../../org/xml/sax/HandlerBase.html"><CODE>HandlerBase</CODE></A>. <i> Use of the DefaultHandler version of this method is recommended as the HandlerBase class has been deprecated in SAX 2.0</i><DD><DL><DT><B>Parameters:</B><DD><CODE>is</CODE> - The InputSource containing the content to be parsed.<DD><CODE>hb</CODE> - The SAX HandlerBase to use.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - If any IO errors occur.<DD><CODE>java.lang.IllegalArgumentException</CODE> - If the InputSource is null.<DD><CODE><A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></CODE> - If the underlying parser throws a SAXException while parsing.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/DocumentHandler.html"><CODE>DocumentHandler</CODE></A></DL></DD></DL><HR><A NAME="parse(org.xml.sax.InputSource, org.xml.sax.helpers.DefaultHandler)"><!-- --></A><H3>parse</H3><PRE>public void <B>parse</B>(<A HREF="../../../org/xml/sax/InputSource.html">InputSource</A> is, <A HREF="../../../org/xml/sax/helpers/DefaultHandler.html">DefaultHandler</A> dh) throws <A HREF="../../../org/xml/sax/SAXException.html">SAXException</A>, java.io.IOException</PRE><DL><DD>Parse the content given <A HREF="../../../org/xml/sax/InputSource.html"><CODE>InputSource</CODE></A> as XML using the specified <A HREF="../../../org/xml/sax/helpers/DefaultHandler.html"><CODE>DefaultHandler</CODE></A>.<DD><DL><DT><B>Parameters:</B><DD><CODE>is</CODE> - The InputSource containing the content to be parsed.<DD><CODE>dh</CODE> - The SAX DefaultHandler to use.<DT><B>Throws:</B><DD><CODE>java.io.IOException</CODE> - If any IO errors occur.<DD><CODE>java.lang.IllegalArgumentException</CODE> - If the InputSource is null.<DD><CODE><A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></CODE> - If the underlying parser throws a SAXException while parsing.<DT><B>See Also: </B><DD><A HREF="../../../org/xml/sax/DocumentHandler.html"><CODE>DocumentHandler</CODE></A></DL></DD></DL><HR><A NAME="getParser()"><!-- --></A><H3>getParser</H3><PRE>public abstract <A HREF="../../../org/xml/sax/Parser.html">Parser</A> <B>getParser</B>() throws <A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></PRE><DL><DD>Returns the SAX parser that is encapsultated by the implementation of this class.<DD><DL><DT><B>Returns:</B><DD>The SAX parser that is encapsultated by the implementation of this class.</DL></DD></DL><HR><A NAME="getXMLReader()"><!-- --></A><H3>getXMLReader</H3><PRE>public abstract <A HREF="../../../org/xml/sax/XMLReader.html">XMLReader</A> <B>getXMLReader</B>() throws <A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></PRE><DL><DD>Returns the <A HREF="../../../org/xml/sax/XMLReader.html"><CODE>XMLReader</CODE></A> that is encapsulated by the implementation of this class.<DD><DL><DT><B>Returns:</B><DD>The XMLReader that is encapsulated by the implementation of this class.</DL></DD></DL><HR><A NAME="isNamespaceAware()"><!-- --></A><H3>isNamespaceAware</H3><PRE>public abstract boolean <B>isNamespaceAware</B>()</PRE><DL><DD>Indicates whether or not this parser is configured to understand namespaces.<DD><DL><DT><B>Returns:</B><DD>true if this parser is configured to understand namespaces; false otherwise.</DL></DD></DL><HR><A NAME="isValidating()"><!-- --></A><H3>isValidating</H3><PRE>public abstract boolean <B>isValidating</B>()</PRE><DL><DD>Indicates whether or not this parser is configured to validate XML documents.<DD><DL><DT><B>Returns:</B><DD>true if this parser is configured to validate XML documents; false otherwise.</DL></DD></DL><HR><A NAME="setProperty(java.lang.String, java.lang.Object)"><!-- --></A><H3>setProperty</H3><PRE>public abstract 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>Sets the particular property in the underlying implementation of <A HREF="../../../org/xml/sax/XMLReader.html"><CODE>XMLReader</CODE></A>. A list of the core features and properties can be found at <a href="http://www.megginson.com/SAX/Java/features.html"> http://www.megginson.com/SAX/Java/features.html </a><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the property to be set.<DD><CODE>value</CODE> - The value of the property to be set.<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A></CODE> - When the underlying XMLReader does not recognize the property name.<DD><CODE><A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A></CODE> - 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#setProperty(java.lang.String, java.lang.Object)"><CODE>XMLReader.setProperty(java.lang.String, java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="getProperty(java.lang.String)"><!-- --></A><H3>getProperty</H3><PRE>public abstract 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>Returns the particular property requested for in the underlying implementation of <A HREF="../../../org/xml/sax/XMLReader.html"><CODE>XMLReader</CODE></A>.<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><CODE><A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A></CODE> - When the underlying XMLReader does not recognize the property name.<DD><CODE><A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A></CODE> - 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><!-- ========= 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/SAXParser.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="../../../javax/xml/parsers/DocumentBuilderFactory.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/xml/parsers/SAXParserFactory.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="SAXParser.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -