saxparser.html

来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 658 行 · 第 1/3 页

HTML
658
字号
                  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&nbsp;f,
                  <A HREF="../../../org/xml/sax/HandlerBase.html">HandlerBase</A>&nbsp;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&nbsp;f,
                  <A HREF="../../../org/xml/sax/helpers/DefaultHandler.html">DefaultHandler</A>&nbsp;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>&nbsp;is,
                  <A HREF="../../../org/xml/sax/HandlerBase.html">HandlerBase</A>&nbsp;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>&nbsp;is,
                  <A HREF="../../../org/xml/sax/helpers/DefaultHandler.html">DefaultHandler</A>&nbsp;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&nbsp;name,
                                 java.lang.Object&nbsp;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&nbsp;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>&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="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/DocumentBuilderFactory.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<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>  &nbsp;
&nbsp;<A HREF="SAXParser.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;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>

</BODY>
</HTML>

⌨️ 快捷键说明

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