documentbuilderfactory.html
来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 614 行 · 第 1/2 页
HTML
614 行
<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">DocumentBuilderFactory</A> <B>newInstance</B>()
throws <A HREF="../../../javax/xml/parsers/FactoryConfigurationError.html">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.<DD><DL>
<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/parsers/FactoryConfigurationError.html">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">DocumentBuilder</A> <B>newDocumentBuilder</B>()
throws <A HREF="../../../javax/xml/parsers/ParserConfigurationException.html">ParserConfigurationException</A></PRE>
<DL>
<DD>Creates a new instance of a <A HREF="../../../javax/xml/parsers/DocumentBuilder.html"><CODE>DocumentBuilder</CODE></A>
using the currently configured parameters.<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">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><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>.<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>.<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><DD><DL>
<DT><B>Parameters:</B><DD><CODE>expandEntityRef</CODE> - true if the parser produced will expand entity
reference nodes; false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="setIgnoringComments(boolean)"><!-- --></A><H3>
setIgnoringComments</H3>
<PRE>
public void <B>setIgnoringComments</B>(boolean ignoreComments)</PRE>
<DL>
<DD>Specifies that the parser produced by this code will
ignore comments. By default the value of this is set to <code>false
</code></DL>
<HR>
<A NAME="setCoalescing(boolean)"><!-- --></A><H3>
setCoalescing</H3>
<PRE>
public void <B>setCoalescing</B>(boolean coalescing)</PRE>
<DL>
<DD>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. By default the value of this is set to
<code>false</code><DD><DL>
<DT><B>Parameters:</B><DD><CODE>coalescing</CODE> - true if the parser produced will convert CDATA nodes
to Text nodes and append it to the adjacent (if any)
text node; false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="isNamespaceAware()"><!-- --></A><H3>
isNamespaceAware</H3>
<PRE>
public boolean <B>isNamespaceAware</B>()</PRE>
<DL>
<DD>Indicates whether or not the factory is configured to produce
parsers which are namespace aware.<DD><DL>
<DT><B>Returns:</B><DD>true if the factory is configured to produce parsers which
are namespace aware; false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="isValidating()"><!-- --></A><H3>
isValidating</H3>
<PRE>
public boolean <B>isValidating</B>()</PRE>
<DL>
<DD>Indicates whether or not the factory is configured to produce
parsers which validate the XML content during parse.<DD><DL>
<DT><B>Returns:</B><DD>true if the factory is configured to produce parsers
which validate the XML content during parse; false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="isIgnoringElementContentWhitespace()"><!-- --></A><H3>
isIgnoringElementContentWhitespace</H3>
<PRE>
public boolean <B>isIgnoringElementContentWhitespace</B>()</PRE>
<DL>
<DD>Indicates whether or not the factory is configured to produce
parsers which ignore ignorable whitespace in element content.<DD><DL>
<DT><B>Returns:</B><DD>true if the factory is configured to produce parsers
which ignore ignorable whitespace in element content;
false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="isExpandEntityReferences()"><!-- --></A><H3>
isExpandEntityReferences</H3>
<PRE>
public boolean <B>isExpandEntityReferences</B>()</PRE>
<DL>
<DD>Indicates whether or not the factory is configured to produce
parsers which expand entity reference nodes.<DD><DL>
<DT><B>Returns:</B><DD>true if the factory is configured to produce parsers
which expand entity reference nodes; false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="isIgnoringComments()"><!-- --></A><H3>
isIgnoringComments</H3>
<PRE>
public boolean <B>isIgnoringComments</B>()</PRE>
<DL>
<DD>Indicates whether or not the factory is configured to produce
parsers which ignores comments.<DD><DL>
<DT><B>Returns:</B><DD>true if the factory is configured to produce parsers
which ignores comments; false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="isCoalescing()"><!-- --></A><H3>
isCoalescing</H3>
<PRE>
public boolean <B>isCoalescing</B>()</PRE>
<DL>
<DD>Indicates whether or not the factory is configured to produce
parsers which converts CDATA nodes to Text nodes and appends it to
the adjacent (if any) Text node.<DD><DL>
<DT><B>Returns:</B><DD>true if the factory is configured to produce parsers
which converts CDATA nodes to Text nodes and appends it to
the adjacent (if any) Text node; false otherwise.</DL>
</DD>
</DL>
<HR>
<A NAME="setAttribute(java.lang.String, java.lang.Object)"><!-- --></A><H3>
setAttribute</H3>
<PRE>
public abstract void <B>setAttribute</B>(java.lang.String name,
java.lang.Object value)
throws java.lang.IllegalArgumentException</PRE>
<DL>
<DD>Allows the user to set specific attributes on the underlying
implementation.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the attribute.<DD><CODE>value</CODE> - The value of the attribute.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - thrown if the underlying
implementation doesn't recognize the attribute.</DL>
</DD>
</DL>
<HR>
<A NAME="getAttribute(java.lang.String)"><!-- --></A><H3>
getAttribute</H3>
<PRE>
public abstract java.lang.Object <B>getAttribute</B>(java.lang.String name)
throws java.lang.IllegalArgumentException</PRE>
<DL>
<DD>Allows the user to retrieve specific attributes on the underlying
implementation.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the attribute.<DT><B>Returns:</B><DD>value The value of the attribute.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - thrown if the underlying
implementation doesn't recognize the attribute.</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="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/DocumentBuilder.html"><B>PREV CLASS</B></A>
<A HREF="../../../javax/xml/parsers/SAXParser.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="DocumentBuilderFactory.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 + =
减小字号Ctrl + -
显示快捷键?