📄 node.html
字号:
<DL><DD>The node is a <code>CDATASection</code>.</DL><HR><A NAME="ENTITY_REFERENCE_NODE"><!-- --></A><H3>ENTITY_REFERENCE_NODE</H3><PRE>public static final short <B>ENTITY_REFERENCE_NODE</B></PRE><DL><DD>The node is an <code>EntityReference</code>.</DL><HR><A NAME="ENTITY_NODE"><!-- --></A><H3>ENTITY_NODE</H3><PRE>public static final short <B>ENTITY_NODE</B></PRE><DL><DD>The node is an <code>Entity</code>.</DL><HR><A NAME="PROCESSING_INSTRUCTION_NODE"><!-- --></A><H3>PROCESSING_INSTRUCTION_NODE</H3><PRE>public static final short <B>PROCESSING_INSTRUCTION_NODE</B></PRE><DL><DD>The node is a <code>ProcessingInstruction</code>.</DL><HR><A NAME="COMMENT_NODE"><!-- --></A><H3>COMMENT_NODE</H3><PRE>public static final short <B>COMMENT_NODE</B></PRE><DL><DD>The node is a <code>Comment</code>.</DL><HR><A NAME="DOCUMENT_NODE"><!-- --></A><H3>DOCUMENT_NODE</H3><PRE>public static final short <B>DOCUMENT_NODE</B></PRE><DL><DD>The node is a <code>Document</code>.</DL><HR><A NAME="DOCUMENT_TYPE_NODE"><!-- --></A><H3>DOCUMENT_TYPE_NODE</H3><PRE>public static final short <B>DOCUMENT_TYPE_NODE</B></PRE><DL><DD>The node is a <code>DocumentType</code>.</DL><HR><A NAME="DOCUMENT_FRAGMENT_NODE"><!-- --></A><H3>DOCUMENT_FRAGMENT_NODE</H3><PRE>public static final short <B>DOCUMENT_FRAGMENT_NODE</B></PRE><DL><DD>The node is a <code>DocumentFragment</code>.</DL><HR><A NAME="NOTATION_NODE"><!-- --></A><H3>NOTATION_NODE</H3><PRE>public static final short <B>NOTATION_NODE</B></PRE><DL><DD>The node is a <code>Notation</code>.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getNodeName()"><!-- --></A><H3>getNodeName</H3><PRE>public java.lang.String <B>getNodeName</B>()</PRE><DL><DD>The name of this node, depending on its type; see the table above.</DL><HR><A NAME="getNodeValue()"><!-- --></A><H3>getNodeValue</H3><PRE>public java.lang.String <B>getNodeValue</B>() throws <A HREF="../../../org/w3c/dom/DOMException.html">DOMException</A></PRE><DL><DD>The value of this node, depending on its type; see the table above. When it is defined to be <code>null</code>, setting it has no effect.<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../org/w3c/dom/DOMException.html">DOMException</A></CODE> - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.<DD><CODE><A HREF="../../../org/w3c/dom/DOMException.html">DOMException</A></CODE> - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a <code>DOMString</code> variable on the implementation platform.</DL></DD></DL><HR><A NAME="setNodeValue(java.lang.String)"><!-- --></A><H3>setNodeValue</H3><PRE>public void <B>setNodeValue</B>(java.lang.String nodeValue) throws <A HREF="../../../org/w3c/dom/DOMException.html">DOMException</A></PRE><DL><DD>The value of this node, depending on its type; see the table above. When it is defined to be <code>null</code>, setting it has no effect.<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../org/w3c/dom/DOMException.html">DOMException</A></CODE> - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.<DD><CODE><A HREF="../../../org/w3c/dom/DOMException.html">DOMException</A></CODE> - DOMSTRING_SIZE_ERR: Raised when it would return more characters than fit in a <code>DOMString</code> variable on the implementation platform.</DL></DD></DL><HR><A NAME="getNodeType()"><!-- --></A><H3>getNodeType</H3><PRE>public short <B>getNodeType</B>()</PRE><DL><DD>A code representing the type of the underlying object, as defined above.</DL><HR><A NAME="getParentNode()"><!-- --></A><H3>getParentNode</H3><PRE>public <A HREF="../../../org/w3c/dom/Node.html">Node</A> <B>getParentNode</B>()</PRE><DL><DD>The parent of this node. All nodes, except <code>Attr</code>, <code>Document</code>, <code>DocumentFragment</code>, <code>Entity</code>, and <code>Notation</code> may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this is <code>null</code>.</DL><HR><A NAME="getChildNodes()"><!-- --></A><H3>getChildNodes</H3><PRE>public <A HREF="../../../org/w3c/dom/NodeList.html">NodeList</A> <B>getChildNodes</B>()</PRE><DL><DD>A <code>NodeList</code> that contains all children of this node. If there are no children, this is a <code>NodeList</code> containing no nodes.</DL><HR><A NAME="getFirstChild()"><!-- --></A><H3>getFirstChild</H3><PRE>public <A HREF="../../../org/w3c/dom/Node.html">Node</A> <B>getFirstChild</B>()</PRE><DL><DD>The first child of this node. If there is no such node, this returns <code>null</code>.</DL><HR><A NAME="getLastChild()"><!-- --></A><H3>getLastChild</H3><PRE>public <A HREF="../../../org/w3c/dom/Node.html">Node</A> <B>getLastChild</B>()</PRE><DL><DD>The last child of this node. If there is no such node, this returns <code>null</code>.</DL><HR><A NAME="getPreviousSibling()"><!-- --></A><H3>getPreviousSibling</H3><PRE>public <A HREF="../../../org/w3c/dom/Node.html">Node</A> <B>getPreviousSibling</B>()</PRE><DL><DD>The node immediately preceding this node. If there is no such node, this returns <code>null</code>.</DL><HR><A NAME="getNextSibling()"><!-- --></A><H3>getNextSibling</H3><PRE>public <A HREF="../../../org/w3c/dom/Node.html">Node</A> <B>getNextSibling</B>()</PRE><DL><DD>The node immediately following this node. If there is no such node, this returns <code>null</code>.</DL><HR><A NAME="getAttributes()"><!-- --></A><H3>getAttributes</H3><PRE>public <A HREF="../../../org/w3c/dom/NamedNodeMap.html">NamedNodeMap</A> <B>getAttributes</B>()</PRE><DL><DD>A <code>NamedNodeMap</code> containing the attributes of this node (if it is an <code>Element</code>) or <code>null</code> otherwise.</DL><HR><A NAME="getOwnerDocument()"><!-- --></A><H3>getOwnerDocument</H3><PRE>public <A HREF="../../../org/w3c/dom/Document.html">Document</A> <B>getOwnerDocument</B>()</PRE><DL><DD>The <code>Document</code> object associated with this node. This is also the <code>Document</code> object used to create new nodes. When this node is a <code>Document</code> or a <code>DocumentType</code> which is not used with any <code>Document</code> yet, this is <code>null</code>.</DL><HR><A NAME="insertBefore(org.w3c.dom.Node, org.w3c.dom.Node)"><!-- --></A><H3>insertBefore</H3><PRE>public <A HREF="../../../org/w3c/dom/Node.html">Node</A> <B>insertBefore</B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A> newChild, <A HREF="../../../org/w3c/dom/Node.html">Node</A> refChild) throws <A HREF="../../../org/w3c/dom/DOMException.html">DOMException</A></PRE><DL><DD>Inserts the node <code>newChild</code> before the existing child node <code>refChild</code>. If <code>refChild</code> is <code>null</code>, insert <code>newChild</code> at the end of the list of children. <br>If <code>newChild</code> is a <code>DocumentFragment</code> object, all of its children are inserted, in the same order, before <code>refChild</code>. If the <code>newChild</code> is already in the tree, it is first removed.<DD><DL><DT><B>Parameters:</B><DD><CODE>newChild</CODE> - The node to insert.<DD><CODE>refChild</CODE> - The reference node, i.e., the node before which the new node must be inserted.<DT><B>Returns:</B><DD>The node being inserted.<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/w3c/dom/DOMException.html">DOMException</A></CODE> - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the <code>newChild</code> node, or if the node to insert is one of this node's ancestors or this node itself. <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created from a different document than the one that created this node. <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or if the parent of the node being inserted is readonly. <br>NOT_FOUND_ERR: Raised if <code>refChild</code> is not a child of this node.</DL></DD></DL><HR><A NAME="replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)"><!-- --></A><H3>replaceChild</H3><PRE>public <A HREF="../../../org/w3c/dom/Node.html">Node</A> <B>replaceChild</B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A> newChild, <A HREF="../../../org/w3c/dom/Node.html">Node</A> oldChild) throws <A HREF="../../../org/w3c/dom/DOMException.html">DOMException</A></PRE><DL><DD>Replaces the child node <code>oldChild</code> with <code>newChild</code> in the list of children, and returns the <code>oldChild</code> node. <br>If <code>newChild</code> is a <code>DocumentFragment</code> object, <code>oldChild</code> is replaced by all of the <code>DocumentFragment</code> children, which are inserted in the same order. If the <code>newChild</code> is already in the tree, it is first removed.<DD><DL><DT><B>Parameters:</B><DD><CODE>newChild</CODE> - The new node to put in the child list.<DD><CODE>oldChild</CODE> - The node being replaced in the list.<DT><B>Returns:</B><DD>The node replaced.<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/w3c/dom/DOMException.html">DOMException</A></CODE> - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the <code>newChild</code> node, or if the node to put in is one of this node's ancestors or this node itself. <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created from a different document than the one that created this node. <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of the new node is readonly. <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of this node.</DL></DD></DL><HR><A NAME="removeChild(org.w3c.dom.Node)"><!-- --></A><H3>removeChild</H3><PRE>public <A HREF="../../../org/w3c/dom/Node.html">Node</A> <B>removeChild</B>(<A HREF="../../../org/w3c/dom/Node.html">Node</A> oldChild) throws <A HREF="../../../org/w3c/dom/DOMException.html">DOMException</A></PRE><DL><DD>Removes the child node indicated by <code>oldChild</code> from the list of children, and returns it.<DD><DL><DT><B>Parameters:</B><DD><CODE>oldChild</CODE> - The node being removed.<DT><B>Returns:</B><DD>The node removed.<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/w3c/dom/DOMException.html">DOMException</A></CODE> - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of this node.</DL></DD></DL><HR><A NAME="appendChild(org.w3c.dom.Node)"><!-- --></A><H3>appendChild</H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -