📄 xmldocument.html
字号:
sets the DOCTYPE-String to use in the XML output.</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="../../../weka/core/xml/XMLDocument.html#setDocument(org.w3c.dom.Document)">setDocument</A></B>(org.w3c.dom.Document newDocument)</CODE><BR> sets the DOM document to use</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="../../../weka/core/xml/XMLDocument.html#setRootNode(java.lang.String)">setRootNode</A></B>(java.lang.String rootNode)</CODE><BR> sets the root node to use in the XML output.</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="../../../weka/core/xml/XMLDocument.html#setValidating(boolean)">setValidating</A></B>(boolean validating)</CODE><BR> sets whether to use a validating parser or not.<br> Note: this does clear the current DOM document!</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../weka/core/xml/XMLDocument.html#toString()">toString</A></B>()</CODE><BR> returns the current DOM document as XML-string</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="../../../weka/core/xml/XMLDocument.html#write(java.io.File)">write</A></B>(java.io.File file)</CODE><BR> writes the current DOM document into the given file</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="../../../weka/core/xml/XMLDocument.html#write(java.io.OutputStream)">write</A></B>(java.io.OutputStream stream)</CODE><BR> writes the current DOM document into the given stream</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="../../../weka/core/xml/XMLDocument.html#write(java.lang.String)">write</A></B>(java.lang.String file)</CODE><BR> writes the current DOM document into the given file</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="../../../weka/core/xml/XMLDocument.html#write(java.io.Writer)">write</A></B>(java.io.Writer writer)</CODE><BR> writes the current DOM document into the given writer</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.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="PI"><!-- --></A><H3>PI</H3><PRE>public static final java.lang.String <B>PI</B></PRE><DL><DD>the parsing instructions "<?xml version=\"1.0\" encoding=\"utf-8\"?>" (may not show up in Javadoc due to tags!)<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#weka.core.xml.XMLDocument.PI">Constant Field Values</A></DL></DL><!-- ========= 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="XMLDocument()"><!-- --></A><H3>XMLDocument</H3><PRE>public <B>XMLDocument</B>() throws java.lang.Exception</PRE><DL><DD>initializes the factory with non-validating parser<P></DL><HR><A NAME="XMLDocument(java.lang.String)"><!-- --></A><H3>XMLDocument</H3><PRE>public <B>XMLDocument</B>(java.lang.String xml) throws java.lang.Exception</PRE><DL><DD>Creates a new instance of XMLDocument<P><DT><B>Parameters:</B><DD><CODE>xml</CODE> - the xml to parse (if "<?xml" is not found then it is considered a file)<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the construction of the DocumentBuilder fails<DT><B>See Also:</B><DD><A HREF="../../../weka/core/xml/XMLDocument.html#setValidating(boolean)"><CODE>setValidating(boolean)</CODE></A></DL><HR><A NAME="XMLDocument(java.io.File)"><!-- --></A><H3>XMLDocument</H3><PRE>public <B>XMLDocument</B>(java.io.File file) throws java.lang.Exception</PRE><DL><DD>Creates a new instance of XMLDocument<P><DT><B>Parameters:</B><DD><CODE>file</CODE> - the XML file to parse<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the construction of the DocumentBuilder fails<DT><B>See Also:</B><DD><A HREF="../../../weka/core/xml/XMLDocument.html#setValidating(boolean)"><CODE>setValidating(boolean)</CODE></A></DL><HR><A NAME="XMLDocument(java.io.InputStream)"><!-- --></A><H3>XMLDocument</H3><PRE>public <B>XMLDocument</B>(java.io.InputStream stream) throws java.lang.Exception</PRE><DL><DD>Creates a new instance of XMLDocument<P><DT><B>Parameters:</B><DD><CODE>stream</CODE> - the XML stream to parse<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the construction of the DocumentBuilder fails<DT><B>See Also:</B><DD><A HREF="../../../weka/core/xml/XMLDocument.html#setValidating(boolean)"><CODE>setValidating(boolean)</CODE></A></DL><HR><A NAME="XMLDocument(java.io.Reader)"><!-- --></A><H3>XMLDocument</H3><PRE>public <B>XMLDocument</B>(java.io.Reader reader) throws java.lang.Exception</PRE><DL><DD>Creates a new instance of XMLDocument<P><DT><B>Parameters:</B><DD><CODE>reader</CODE> - the XML reader to parse<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the construction of the DocumentBuilder fails<DT><B>See Also:</B><DD><A HREF="../../../weka/core/xml/XMLDocument.html#setValidating(boolean)"><CODE>setValidating(boolean)</CODE></A></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="getFactory()"><!-- --></A><H3>getFactory</H3><PRE>public javax.xml.parsers.DocumentBuilderFactory <B>getFactory</B>()</PRE><DL><DD>returns the DocumentBuilderFactory<P><DD><DL><DT><B>Returns:</B><DD>the DocumentBuilderFactory</DL></DD></DL><HR><A NAME="getBuilder()"><!-- --></A><H3>getBuilder</H3><PRE>public javax.xml.parsers.DocumentBuilder <B>getBuilder</B>()</PRE><DL><DD>returns the DocumentBuilder<P><DD><DL><DT><B>Returns:</B><DD>the DocumentBuilder</DL></DD></DL><HR><A NAME="getValidating()"><!-- --></A><H3>getValidating</H3><PRE>public boolean <B>getValidating</B>()</PRE><DL><DD>returns whether a validating parser is used<P><DD><DL><DT><B>Returns:</B><DD>whether a validating parser is used</DL></DD></DL><HR><A NAME="setValidating(boolean)"><!-- --></A><H3>setValidating</H3><PRE>public void <B>setValidating</B>(boolean validating) throws java.lang.Exception</PRE><DL><DD>sets whether to use a validating parser or not.<br> Note: this does clear the current DOM document!<P><DD><DL><DT><B>Parameters:</B><DD><CODE>validating</CODE> - whether to use a validating parser<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the instantiating of the DocumentBuilder fails</DL></DD></DL><HR><A NAME="getDocument()"><!-- --></A><H3>getDocument</H3><PRE>public org.w3c.dom.Document <B>getDocument</B>()</PRE><DL><DD>returns the parsed DOM document<P><DD><DL><DT><B>Returns:</B><DD>the parsed DOM document</DL></DD></DL><HR><A NAME="setDocument(org.w3c.dom.Document)"><!-- --></A><H3>setDocument</H3><PRE>public void <B>setDocument</B>(org.w3c.dom.Document newDocument)</PRE><DL><DD>sets the DOM document to use<P><DD><DL><DT><B>Parameters:</B><DD><CODE>newDocument</CODE> - the DOM document to use</DL></DD></DL><HR><A NAME="setDocType(java.lang.String)"><!-- --></A><H3>setDocType</H3><PRE>public void <B>setDocType</B>(java.lang.String docType)</PRE><DL><DD>sets the DOCTYPE-String to use in the XML output. Performs NO checking! if it is <code>null</code> the DOCTYPE is omitted.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>docType</CODE> - the DOCTYPE definition to use in XML output</DL></DD></DL><HR><A NAME="getDocType()"><!-- --></A><H3>getDocType</H3><PRE>public java.lang.String <B>getDocType</B>()</PRE><DL><DD>returns the current DOCTYPE, can be <code>null</code><P><DD><DL><DT><B>Returns:</B><DD>the current DOCTYPE definition, can be <code>null</code></DL></DD></DL><HR><A NAME="setRootNode(java.lang.String)"><!-- --></A><H3>setRootNode</H3><PRE>public void <B>setRootNode</B>(java.lang.String rootNode)</PRE><DL><DD>sets the root node to use in the XML output. Performs NO checking with DOCTYPE!<P><DD><DL></DL></DD></DL><HR><A NAME="getRootNode()"><!-- --></A><H3>getRootNode</H3><PRE>public java.lang.String <B>getRootNode</B>()</PRE><DL><DD>returns the current root node
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -