saxparser.html

来自「j2ee api,很好的api。我这现在有」· HTML 代码 · 共 797 行 · 第 1/4 页

HTML
797
字号
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates whether or not this parser is configured to understand namespaces.</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/SAXParser.html#isValidating()">isValidating</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Indicates whether or not this parser is configured to validate XML documents.</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/SAXParser.html#parse(java.io.File, org.xml.sax.helpers.DefaultHandler)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A>&nbsp;f,      <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/helpers/DefaultHandler.html" title="class or interface in org.xml.sax.helpers">DefaultHandler</A>&nbsp;dh)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse the content of the file specified as XML using the specified <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/helpers/DefaultHandler.html" title="class or interface in org.xml.sax.helpers"><CODE>DefaultHandler</CODE></A>.</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/SAXParser.html#parse(java.io.File, org.xml.sax.HandlerBase)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A>&nbsp;f,      <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/HandlerBase.html" title="class or interface in org.xml.sax">HandlerBase</A>&nbsp;hb)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse the content of the file specified as XML using the specified <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/HandlerBase.html" title="class or interface in org.xml.sax"><CODE>HandlerBase</CODE></A>. </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/SAXParser.html#parse(org.xml.sax.InputSource, org.xml.sax.helpers.DefaultHandler)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/InputSource.html" title="class or interface in org.xml.sax">InputSource</A>&nbsp;is,      <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/helpers/DefaultHandler.html" title="class or interface in org.xml.sax.helpers">DefaultHandler</A>&nbsp;dh)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse the content given <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/InputSource.html" title="class or interface in org.xml.sax"><CODE>InputSource</CODE></A> as XML using the specified <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/helpers/DefaultHandler.html" title="class or interface in org.xml.sax.helpers"><CODE>DefaultHandler</CODE></A>.</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/SAXParser.html#parse(org.xml.sax.InputSource, org.xml.sax.HandlerBase)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/InputSource.html" title="class or interface in org.xml.sax">InputSource</A>&nbsp;is,      <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/HandlerBase.html" title="class or interface in org.xml.sax">HandlerBase</A>&nbsp;hb)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse the content given <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/InputSource.html" title="class or interface in org.xml.sax"><CODE>InputSource</CODE></A> as XML using the specified <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/HandlerBase.html" title="class or interface in org.xml.sax"><CODE>HandlerBase</CODE></A>. </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/SAXParser.html#parse(java.io.InputStream, org.xml.sax.helpers.DefaultHandler)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A>&nbsp;is,      <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/helpers/DefaultHandler.html" title="class or interface in org.xml.sax.helpers">DefaultHandler</A>&nbsp;dh)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse the content of the given <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io"><CODE>InputStream</CODE></A> instance as XML using the specified <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/helpers/DefaultHandler.html" title="class or interface in org.xml.sax.helpers"><CODE>DefaultHandler</CODE></A>.</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/SAXParser.html#parse(java.io.InputStream, org.xml.sax.helpers.DefaultHandler, java.lang.String)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A>&nbsp;is,      <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/helpers/DefaultHandler.html" title="class or interface in org.xml.sax.helpers">DefaultHandler</A>&nbsp;dh,      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;systemId)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse the content of the given <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io"><CODE>InputStream</CODE></A> instance as XML using the specified <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/helpers/DefaultHandler.html" title="class or interface in org.xml.sax.helpers"><CODE>DefaultHandler</CODE></A>.</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/SAXParser.html#parse(java.io.InputStream, org.xml.sax.HandlerBase)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A>&nbsp;is,      <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/HandlerBase.html" title="class or interface in org.xml.sax">HandlerBase</A>&nbsp;hb)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse the content of the given <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io"><CODE>InputStream</CODE></A> instance as XML using the specified <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/HandlerBase.html" title="class or interface in org.xml.sax"><CODE>HandlerBase</CODE></A>. </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/SAXParser.html#parse(java.io.InputStream, org.xml.sax.HandlerBase, java.lang.String)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A>&nbsp;is,      <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/HandlerBase.html" title="class or interface in org.xml.sax">HandlerBase</A>&nbsp;hb,      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;systemId)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse the content of the given <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io"><CODE>InputStream</CODE></A> instance as XML using the specified <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/HandlerBase.html" title="class or interface in org.xml.sax"><CODE>HandlerBase</CODE></A>. </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/SAXParser.html#parse(java.lang.String, org.xml.sax.helpers.DefaultHandler)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;uri,      <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/helpers/DefaultHandler.html" title="class or interface in org.xml.sax.helpers">DefaultHandler</A>&nbsp;dh)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/helpers/DefaultHandler.html" title="class or interface in org.xml.sax.helpers"><CODE>DefaultHandler</CODE></A>.</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/SAXParser.html#parse(java.lang.String, org.xml.sax.HandlerBase)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;uri,      <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/HandlerBase.html" title="class or interface in org.xml.sax">HandlerBase</A>&nbsp;hb)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parse the content described by the giving Uniform Resource Identifier (URI) as XML using the specified <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/HandlerBase.html" title="class or interface in org.xml.sax"><CODE>HandlerBase</CODE></A>. </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/SAXParser.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name,            <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the particular property in the underlying implementation of <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/XMLReader.html" title="class or interface in org.xml.sax"><CODE>XMLReader</CODE></A>. </TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="SAXParser()"><!-- --></A><H3>SAXParser</H3><PRE>protected <B>SAXParser</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="parse(java.io.InputStream, org.xml.sax.HandlerBase)"><!-- --></A><H3>parse</H3><PRE>public void <B>parse</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A>&nbsp;is,                  <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/HandlerBase.html" title="class or interface in org.xml.sax">HandlerBase</A>&nbsp;hb)           throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/SAXException.html" title="class or interface in org.xml.sax">SAXException</A>,                  <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></PRE><DL><DD>Parse the content of the given <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io"><CODE>InputStream</CODE></A> instance as XML using the specified <A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/HandlerBase.html" title="class or interface in org.xml.sax"><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><P><DD><DL><DT><B>Parameters:</B><DD><CODE>is</CODE> - InputStream containing the content to be parsed.<DD><CODE>hb</CODE> - The SAX HandlerBase to use.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - If any IO errors occur.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - If the given InputStream is null.<DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/SAXException.html" title="class or interface in org.xml.sax">SAXException</A></CODE> - If the underlying parser throws a SAXException while parsing.<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/j2se/1.4/docs/api/org/xml/sax/DocumentHandler.html" title="class or interface in org.xml.sax"><CODE>DocumentHandler</CODE></A></DL>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?