xmlstreamreader.html

来自「j2ee帮助文档软件设计/软件工程 文件格式」· HTML 代码 · 共 1,517 行 · 第 1/5 页

HTML
1,517
字号
</DD></DL><HR><A NAME="getNamespaceURI(java.lang.String)"><!-- --></A><H3>getNamespaceURI</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getNamespaceURI</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;prefix)</PRE><DL><DD>Return the uri for the given prefix. The uri returned depends on the current state of the processor. <p><strong>NOTE:</strong>The 'xml' prefix is bound as defined in <a href="http://www.w3.org/TR/REC-xml-names/#ns-using">Namespaces in XML</a> specification to "http://www.w3.org/XML/1998/namespace". <p><strong>NOTE:</strong> The 'xmlns' prefix must be resolved to following namespace <a href="http://www.w3.org/2000/xmlns/">http://www.w3.org/2000/xmlns/</a><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>prefix</CODE> - The prefix to lookup, may not be null<DT><B>Returns:</B><DD>the uri bound to the given prefix or null if it is not bound<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the prefix is null</DL></DD></DL><HR><A NAME="isStartElement()"><!-- --></A><H3>isStartElement</H3><PRE>boolean <B>isStartElement</B>()</PRE><DL><DD>Returns true if the cursor points to a start tag (otherwise false)<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the cursor points to a start tag, false otherwise</DL></DD></DL><HR><A NAME="isEndElement()"><!-- --></A><H3>isEndElement</H3><PRE>boolean <B>isEndElement</B>()</PRE><DL><DD>Returns true if the cursor points to an end tag (otherwise false)<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the cursor points to an end tag, false otherwise</DL></DD></DL><HR><A NAME="isCharacters()"><!-- --></A><H3>isCharacters</H3><PRE>boolean <B>isCharacters</B>()</PRE><DL><DD>Returns true if the cursor points to a character data event<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the cursor points to character data, false otherwise</DL></DD></DL><HR><A NAME="isWhiteSpace()"><!-- --></A><H3>isWhiteSpace</H3><PRE>boolean <B>isWhiteSpace</B>()</PRE><DL><DD>Returns true if the cursor points to a character data event that consists of all whitespace<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the cursor points to all whitespace, false otherwise</DL></DD></DL><HR><A NAME="getAttributeValue(java.lang.String, java.lang.String)"><!-- --></A><H3>getAttributeValue</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getAttributeValue</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;namespaceURI,                         <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;localName)</PRE><DL><DD>Returns the normalized attribute value of the attribute with the namespace and localName If the namespaceURI is null the namespace is not checked for equality<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>namespaceURI</CODE> - the namespace of the attribute<DD><CODE>localName</CODE> - the local name of the attribute, cannot be null<DT><B>Returns:</B><DD>returns the value of the attribute , returns null if not found<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this is not a START_ELEMENT or ATTRIBUTE</DL></DD></DL><HR><A NAME="getAttributeCount()"><!-- --></A><H3>getAttributeCount</H3><PRE>int <B>getAttributeCount</B>()</PRE><DL><DD>Returns the count of attributes on this START_ELEMENT, this method is only valid on a START_ELEMENT or ATTRIBUTE.  This count excludes namespace definitions.  Attribute indices are zero-based.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>returns the number of attributes<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this is not a START_ELEMENT or ATTRIBUTE</DL></DD></DL><HR><A NAME="getAttributeName(int)"><!-- --></A><H3>getAttributeName</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/javax/xml/namespace/QName.html" title="class or interface in javax.xml.namespace">QName</A> <B>getAttributeName</B>(int&nbsp;index)</PRE><DL><DD>Returns the qname of the attribute at the provided index<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the position of the attribute<DT><B>Returns:</B><DD>the QName of the attribute<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this is not a START_ELEMENT or ATTRIBUTE</DL></DD></DL><HR><A NAME="getAttributeNamespace(int)"><!-- --></A><H3>getAttributeNamespace</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getAttributeNamespace</B>(int&nbsp;index)</PRE><DL><DD>Returns the namespace of the attribute at the provided index<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the position of the attribute<DT><B>Returns:</B><DD>the namespace URI (can be null)<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this is not a START_ELEMENT or ATTRIBUTE</DL></DD></DL><HR><A NAME="getAttributeLocalName(int)"><!-- --></A><H3>getAttributeLocalName</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getAttributeLocalName</B>(int&nbsp;index)</PRE><DL><DD>Returns the localName of the attribute at the provided index<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the position of the attribute<DT><B>Returns:</B><DD>the localName of the attribute<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this is not a START_ELEMENT or ATTRIBUTE</DL></DD></DL><HR><A NAME="getAttributePrefix(int)"><!-- --></A><H3>getAttributePrefix</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getAttributePrefix</B>(int&nbsp;index)</PRE><DL><DD>Returns the prefix of this attribute at the provided index<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the position of the attribute<DT><B>Returns:</B><DD>the prefix of the attribute<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this is not a START_ELEMENT or ATTRIBUTE</DL></DD></DL><HR><A NAME="getAttributeType(int)"><!-- --></A><H3>getAttributeType</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getAttributeType</B>(int&nbsp;index)</PRE><DL><DD>Returns the XML type of the attribute at the provided index<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the position of the attribute<DT><B>Returns:</B><DD>the XML type of the attribute<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this is not a START_ELEMENT or ATTRIBUTE</DL></DD></DL><HR><A NAME="getAttributeValue(int)"><!-- --></A><H3>getAttributeValue</H3><PRE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getAttributeValue</B>(int&nbsp;index)</PRE><DL><DD>Returns the value of the attribute at the index<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the position of the attribute<DT><B>Returns:</B><DD>the attribute value<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this is not a START_ELEMENT or ATTRIBUTE</DL></DD></DL><HR><A NAME="isAttributeSpecified(int)"><!-- --></A><H3>isAttributeSpecified</H3><PRE>boolean <B>isAttributeSpecified</B>(int&nbsp;index)</PRE><DL><DD>Returns a boolean which indicates if this attribute was created by default<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>index</CODE> - the position of the attribute<DT><B>Returns:</B><DD>true if this is a default attribute<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this is not a START_ELEMENT or ATTRIBUTE</DL></DD></DL><HR><A NAME="getNamespaceCount()"><!-- --></A><H3>getNamespaceCount</H3><PRE>int <B>getNamespaceCount</B>()</PRE><DL><DD>Returns the count of namespaces declared on this START_ELEMENT or END_ELEMENT, this method is only valid on a START_ELEMENT, END_ELEMENT or NAMESPACE. On an END_ELEMENT the count is of the namespaces that are about to go out of scope.  This is the equivalent of the information reported by SAX callback for an end element event.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>returns the number of namespace declarations on this specific element<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if this is not a START_ELEMENT, END_ELEMENT or NAMESPACE</DL></DD>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?