📄 element.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Fri Feb 22 14:38:36 CET 2002 --><TITLE>: Class Element</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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="../../../org/kxml/kdom/Document.html"><B>PREV CLASS</B></A> <A HREF="../../../org/kxml/kdom/Node.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="Element.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.kxml.kdom</FONT><BR>Class Element</H2><PRE>java.lang.Object | +--<A HREF="../../../org/kxml/kdom/Node.html">org.kxml.kdom.Node</A> | +--<B>org.kxml.kdom.Element</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../org/kxml/XmlIO.html">XmlIO</A></DD></DL><HR><DL><DT>public class <B>Element</B><DT>extends <A HREF="../../../org/kxml/kdom/Node.html">Node</A></DL><P>In order to create an element, please use the createElement methodinstead of invoking the constructor directly. The right place toadd user defined initialization code is the init method.<P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected java.util.Vector</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#attributes">attributes</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#name">name</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#namespace">namespace</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../org/kxml/kdom/Node.html">Node</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#parent">parent</A></B></CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../../org/kxml/PrefixMap.html">PrefixMap</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#prefixMap">prefixMap</A></B></CODE><BR> </TD></TR></TABLE> <A NAME="fields_inherited_from_class_org.kxml.kdom.Node"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class org.kxml.kdom.<A HREF="../../../org/kxml/kdom/Node.html">Node</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../org/kxml/kdom/Node.html#children">children</A>, <A HREF="../../../org/kxml/kdom/Node.html#types">types</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#Element()">Element</A></B>()</CODE><BR> </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></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="../../../org/kxml/kdom/Element.html#clear()">clear</A></B>()</CODE><BR> removes all children and attributes</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/kxml/kdom/Element.html">Element</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#createElement(java.lang.String, java.lang.String)">createElement</A></B>(java.lang.String namespace, java.lang.String name)</CODE><BR> Forwards creation request to parent if any, otherwisecalls super.createElement.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/kxml/Attribute.html">Attribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#getAttribute(int)">getAttribute</A></B>(int index)</CODE><BR> Returns the attribute at the given index.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/kxml/Attribute.html">Attribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#getAttribute(java.lang.String)">getAttribute</A></B>(java.lang.String name)</CODE><BR> convenience method for getAttribute (Xml.NO_NAMESPACE, name)</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/kxml/Attribute.html">Attribute</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#getAttribute(java.lang.String, java.lang.String)">getAttribute</A></B>(java.lang.String namespace, java.lang.String name)</CODE><BR> returns the attribute with the given namespace and name.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#getAttributeCount()">getAttributeCount</A></B>()</CODE><BR> Returns the number of attributes of this element.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Vector</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#getAttributes()">getAttributes</A></B>()</CODE><BR> Returns a Vector containing all Attributes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/kxml/kdom/Document.html">Document</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#getDocument()">getDocument</A></B>()</CODE><BR> Returns the document this element is a member of.</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="../../../org/kxml/kdom/Element.html#getName()">getName</A></B>()</CODE><BR> returns the (local) name of the element</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="../../../org/kxml/kdom/Element.html#getNamespace()">getNamespace</A></B>()</CODE><BR> returns the namespace of the element</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/kxml/kdom/Node.html">Node</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#getParent()">getParent</A></B>()</CODE><BR> Returns the parent node of this element</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/kxml/kdom/Element.html">Element</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/kxml/kdom/Element.html#getParentElement()">getParentElement</A></B>()</CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -