documentbuilderfactory.html
来自「j2ee api,很好的api。我这现在有」· HTML 代码 · 共 711 行 · 第 1/3 页
HTML
711 行
<BR> Allows the user to set specific attributes on the underlying implementation.</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="../../../javax/xml/parsers/DocumentBuilderFactory.html#setCoalescing(boolean)">setCoalescing</A></B>(boolean coalescing)</CODE><BR> Specifies that the parser produced by this code will convert CDATA nodes to Text nodes and append it to the adjacent (if any) text node. </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="../../../javax/xml/parsers/DocumentBuilderFactory.html#setExpandEntityReferences(boolean)">setExpandEntityReferences</A></B>(boolean expandEntityRef)</CODE><BR> Specifies that the parser produced by this code will expand entity reference nodes. </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="../../../javax/xml/parsers/DocumentBuilderFactory.html#setIgnoringComments(boolean)">setIgnoringComments</A></B>(boolean ignoreComments)</CODE><BR> Specifies that the parser produced by this code will ignore comments. </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="../../../javax/xml/parsers/DocumentBuilderFactory.html#setIgnoringElementContentWhitespace(boolean)">setIgnoringElementContentWhitespace</A></B>(boolean whitespace)</CODE><BR> Specifies that the parsers created by this factory must eliminate whitespace in element content (sometimes known loosely as 'ignorable whitespace') when parsing XML documents (see XML Rec 2.10). </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="../../../javax/xml/parsers/DocumentBuilderFactory.html#setNamespaceAware(boolean)">setNamespaceAware</A></B>(boolean awareness)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/parsers/DocumentBuilderFactory.html#setValidating(boolean)">setValidating</A></B>(boolean validating)</CODE><BR> Specifies that the parser produced by this code will validate documents as they are parsed. </TD></TR></TABLE> <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> <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="DocumentBuilderFactory()"><!-- --></A><H3>DocumentBuilderFactory</H3><PRE>protected <B>DocumentBuilderFactory</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="newInstance()"><!-- --></A><H3>newInstance</H3><PRE>public static <A HREF="../../../javax/xml/parsers/DocumentBuilderFactory.html" title="class in javax.xml.parsers">DocumentBuilderFactory</A> <B>newInstance</B>() throws <A HREF="../../../javax/xml/parsers/FactoryConfigurationError.html" title="class in javax.xml.parsers">FactoryConfigurationError</A></PRE><DL><DD>Obtain a new instance of a <code>DocumentBuilderFactory</code>. This static method creates a new factory instance. This method uses the following ordered lookup procedure to determine the <code>DocumentBuilderFactory</code> implementation class to load: <ul> <li> Use the <code>javax.xml.parsers.DocumentBuilderFactory</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. </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.DocumentBuilderFactory</code> in jars available to the runtime. </li> <li> Platform default <code>DocumentBuilderFactory</code> instance. </li> </ul> Once an application has obtained a reference to a <code>DocumentBuilderFactory</code> it can use the factory to configure and obtain parser instances.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/parsers/FactoryConfigurationError.html" title="class in javax.xml.parsers">FactoryConfigurationError</A></CODE> - if the implementation is not available or cannot be instantiated.</DL></DD></DL><HR><A NAME="newDocumentBuilder()"><!-- --></A><H3>newDocumentBuilder</H3><PRE>public abstract <A HREF="../../../javax/xml/parsers/DocumentBuilder.html" title="class in javax.xml.parsers">DocumentBuilder</A> <B>newDocumentBuilder</B>() throws <A HREF="../../../javax/xml/parsers/ParserConfigurationException.html" title="class in javax.xml.parsers">ParserConfigurationException</A></PRE><DL><DD>Creates a new instance of a <A HREF="../../../javax/xml/parsers/DocumentBuilder.html" title="class in javax.xml.parsers"><CODE>DocumentBuilder</CODE></A> using the currently configured parameters.<P><DD><DL><DT><B>Returns:</B><DD>A new instance of a DocumentBuilder.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/parsers/ParserConfigurationException.html" title="class in javax.xml.parsers">ParserConfigurationException</A></CODE> - if a DocumentBuilder cannot be created which satisfies the configuration requested.</DL></DD></DL><HR><A NAME="setNamespaceAware(boolean)"><!-- --></A><H3>setNamespaceAware</H3><PRE>public void <B>setNamespaceAware</B>(boolean 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><P><DD><DL><DT><B>Parameters:</B><DD><CODE>awareness</CODE> - true if the parser produced 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 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><DD><DL><DT><B>Parameters:</B><DD><CODE>validating</CODE> - true if the parser produced will validate documents as they are parsed; false otherwise.</DL></DD></DL><HR><A NAME="setIgnoringElementContentWhitespace(boolean)"><!-- --></A><H3>setIgnoringElementContentWhitespace</H3><PRE>public void <B>setIgnoringElementContentWhitespace</B>(boolean whitespace)</PRE><DL><DD>Specifies that the parsers created by this factory must eliminate whitespace in element content (sometimes known loosely as 'ignorable whitespace') when parsing XML documents (see XML Rec 2.10). Note that only whitespace which is directly contained within element content that has an element only content model (see XML Rec 3.2.1) will be eliminated. Due to reliance on the content model this setting requires the parser to be in validating mode. By default the value of this is set to <code>false</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>whitespace</CODE> - true if the parser created must eliminate whitespace in the element content when parsing XML documents; false otherwise.</DL></DD></DL><HR><A NAME="setExpandEntityReferences(boolean)"><!-- --></A><H3>setExpandEntityReferences</H3><PRE>public void <B>setExpandEntityReferences</B>(boolean expandEntityRef)</PRE><DL><DD>Specifies that the parser produced by this code will expand entity reference nodes. By default the value of this is set to <code>true</code><P><DD><DL>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?