xmldocument.html
来自「数据挖掘的最常用工具。由于开源」· HTML 代码 · 共 1,537 行 · 第 1/4 页
HTML
1,537 行
ATT_NAME</H3><PRE>public static final java.lang.String <B>ATT_NAME</B></PRE><DL><DD>the "name" attribute.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#weka.core.xml.XMLDocument.ATT_NAME">Constant Field Values</A></DL></DL><HR><A NAME="VAL_YES"><!-- --></A><H3>VAL_YES</H3><PRE>public static final java.lang.String <B>VAL_YES</B></PRE><DL><DD>the value "yes".<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#weka.core.xml.XMLDocument.VAL_YES">Constant Field Values</A></DL></DL><HR><A NAME="VAL_NO"><!-- --></A><H3>VAL_NO</H3><PRE>public static final java.lang.String <B>VAL_NO</B></PRE><DL><DD>the value "no".<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#weka.core.xml.XMLDocument.VAL_NO">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"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></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><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the construction fails</DL></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><DL><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></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><DL><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></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><DL><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></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><DL><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></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></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></DL></DD><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></DL></DD><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></DL></DD><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></DL></DD><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></DL></DD><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></DL></DD><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></DL></DD><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></DL></DD><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><DD><DL><DT><B>Parameters:</B><DD><CODE>rootNode</CODE> - the root node to use in the XML output</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.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the current root node</DL></DD></DL><HR><A NAME="clear()"><!-- --></A><H3>clear</H3><PRE>public void <B>clear</B>()</PRE><DL><DD>sets up an empty DOM document, with the current DOCTYPE and root node.<P><DD><DL></DL></DD><DD><DL><DT><B>See Also:</B><DD><A HREF="../../../weka/core/xml/XMLDocument.html#setRootNode(java.lang.String)"><CODE>setRootNode(String)</CODE></A>, <A HREF="../../../weka/core/xml/XMLDocument.html#setDocType(java.lang.String)"><CODE>setDocType(String)</CODE></A></DL></DD></DL><HR><A NAME="newDocument(java.lang.String, java.lang.String)"><!-- --></A><H3>newDocument</H3><PRE>public org.w3c.dom.Document <B>newDocument</B>(java.lang.String docType, java.lang.String rootNode)</PRE><DL><DD>creates a new Document with the given information.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>docType</CODE> - the DOCTYPE definition (no checking happens!), can be null<DD><CODE>rootNode</CODE> - the name of the root node (must correspond to the one given in <code>docType</code>)<DT><B>Returns:</B><DD>returns the just created DOM document for convenience</DL></DD></DL><HR><A NAME="read(java.lang.String)"><!-- --></A><H3>read</H3><PRE>public org.w3c.dom.Document <B>read</B>(java.lang.String xml) throws java.lang.Exception</PRE><DL><DD>parses the given XML string (can be XML or a filename) and returns a DOM Document.<P><DD><DL></DL></DD><DD><DL><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>Returns:</B><DD>the parsed DOM document<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong with the parsing</DL></DD></DL><HR><A NAME="read(java.io.File)"><!-- --></A><H3>read</H3><PRE>public org.w3c.dom.Document <B>read</B>(java.io.File file) throws java.lang.Exception</PRE><DL><DD>parses the given file and returns a DOM document.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>file</CODE> - the XML file to parse<DT><B>Returns:</B><DD>the parsed DOM document<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong with the parsing</DL></DD></DL><HR><A NAME="read(java.io.InputStream)"><!-- --></A><H3>read</H3><PRE>public org.w3c.dom.Document <B>read</B>(java.io.InputStream stream) throws java.lang.Exception</PRE><DL><DD>parses the given stream and returns a DOM document.<P>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?