📄 attributesimpl.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 Wed Oct 31 22:26:27 PST 2001 --><TITLE>Java API for XML Processing Specification 1.1: Class AttributesImpl</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="class-use/AttributesImpl.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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/xml/sax/helpers/AttributeListImpl.html"><B>PREV CLASS</B></A> <A HREF="../../../../org/xml/sax/helpers/DefaultHandler.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="AttributesImpl.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><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.xml.sax.helpers</FONT><BR>Class AttributesImpl</H2><PRE>java.lang.Object | +--<B>org.xml.sax.helpers.AttributesImpl</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../org/xml/sax/Attributes.html">Attributes</A></DD></DL><HR><DL><DT>public class <B>AttributesImpl</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../org/xml/sax/Attributes.html">Attributes</A></DL><P>Default implementation of the Attributes interface. <blockquote> <em>This module, both source code and documentation, is in the Public Domain, and comes with <strong>NO WARRANTY</strong>.</em> </blockquote> <p>This class provides a default implementation of the SAX2 <A HREF="../../../../org/xml/sax/Attributes.html"><CODE>Attributes</CODE></A> interface, with the addition of manipulators so that the list can be modified or reused.</p> <p>There are two typical uses of this class:</p> <ol> <li>to take a persistent snapshot of an Attributes object in a <A HREF="../../../../org/xml/sax/ContentHandler.html#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)"><CODE>startElement</CODE></A> event; or</li> <li>to construct or modify an Attributes object in a SAX2 driver or filter.</li> </ol> <p>This class replaces the now-deprecated SAX1 <A HREF="../../../../org/xml/sax/helpers/AttributeListImpl.html"><CODE>AttributeListImpl</CODE></A> class; in addition to supporting the updated Attributes interface rather than the deprecated <A HREF="../../../../org/xml/sax/AttributeList.html"><CODE>AttributeList</CODE></A> interface, it also includes a much more efficient implementation using a single array rather than a set of Vectors.</p><P><DL><DT><B>Since: </B><DD>SAX 2.0</DD><DT><B>Version: </B><DD>2.0r2pre</DD><DT><B>Author: </B><DD>David Megginson, <a href="mailto:sax@megginson.com">sax@megginson.com</a></DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== 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/xml/sax/helpers/AttributesImpl.html#AttributesImpl()">AttributesImpl</A></B>()</CODE><BR> Construct a new, empty AttributesImpl object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../org/xml/sax/helpers/AttributesImpl.html#AttributesImpl(org.xml.sax.Attributes)">AttributesImpl</A></B>(<A HREF="../../../../org/xml/sax/Attributes.html">Attributes</A> atts)</CODE><BR> Copy an existing Attributes object.</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/xml/sax/helpers/AttributesImpl.html#addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)">addAttribute</A></B>(java.lang.String uri, java.lang.String localName, java.lang.String qName, java.lang.String type, java.lang.String value)</CODE><BR> Add an attribute to the end of the list.</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/xml/sax/helpers/AttributesImpl.html#clear()">clear</A></B>()</CODE><BR> Clear the attribute list for reuse.</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/xml/sax/helpers/AttributesImpl.html#getIndex(java.lang.String)">getIndex</A></B>(java.lang.String qName)</CODE><BR> Look up an attribute's index by qualified (prefixed) 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/xml/sax/helpers/AttributesImpl.html#getIndex(java.lang.String, java.lang.String)">getIndex</A></B>(java.lang.String uri, java.lang.String localName)</CODE><BR> Look up an attribute's index by Namespace 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/xml/sax/helpers/AttributesImpl.html#getLength()">getLength</A></B>()</CODE><BR> Return the number of attributes in the list.</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/xml/sax/helpers/AttributesImpl.html#getLocalName(int)">getLocalName</A></B>(int index)</CODE><BR> Return an attribute's local name.</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/xml/sax/helpers/AttributesImpl.html#getQName(int)">getQName</A></B>(int index)</CODE><BR> Return an attribute's qualified (prefixed) name.</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/xml/sax/helpers/AttributesImpl.html#getType(int)">getType</A></B>(int index)</CODE><BR> Return an attribute's type by index.</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/xml/sax/helpers/AttributesImpl.html#getType(java.lang.String)">getType</A></B>(java.lang.String qName)</CODE><BR> Look up an attribute's type by qualified (prefixed) name.</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/xml/sax/helpers/AttributesImpl.html#getType(java.lang.String, java.lang.String)">getType</A></B>(java.lang.String uri, java.lang.String localName)</CODE><BR> Look up an attribute's type by Namespace-qualified name.</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/xml/sax/helpers/AttributesImpl.html#getURI(int)">getURI</A></B>(int index)</CODE><BR> Return an attribute's Namespace URI.</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/xml/sax/helpers/AttributesImpl.html#getValue(int)">getValue</A></B>(int index)</CODE><BR> Return an attribute's value by index.</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/xml/sax/helpers/AttributesImpl.html#getValue(java.lang.String)">getValue</A></B>(java.lang.String qName)</CODE><BR> Look up an attribute's value by qualified (prefixed) name.</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/xml/sax/helpers/AttributesImpl.html#getValue(java.lang.String, java.lang.String)">getValue</A></B>(java.lang.String uri, java.lang.String localName)</CODE><BR> Look up an attribute's value by Namespace-qualified name.</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/xml/sax/helpers/AttributesImpl.html#removeAttribute(int)">removeAttribute</A></B>(int index)</CODE><BR> Remove an attribute from the list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -