xmlstreamwriter.html

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

HTML
1,059
字号
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeDefaultNamespace(java.lang.String)">writeDefaultNamespace</A></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)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes the default namespace to the stream</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeDTD(java.lang.String)">writeDTD</A></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;dtd)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write a DTD section.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeEmptyElement(java.lang.String)">writeEmptyElement</A></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;localName)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an empty element tag to the output</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeEmptyElement(java.lang.String, java.lang.String)">writeEmptyElement</A></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)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an empty element tag to the output</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeEmptyElement(java.lang.String, java.lang.String, java.lang.String)">writeEmptyElement</A></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,                  <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,                  <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)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an empty element tag to the output</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeEndDocument()">writeEndDocument</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes any start tags and writes corresponding end tags.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeEndElement()">writeEndElement</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an end tag to the output relying on the internal  state of the writer to determine the prefix and local name of the event.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeEntityRef(java.lang.String)">writeEntityRef</A></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;name)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes an entity reference</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeNamespace(java.lang.String, java.lang.String)">writeNamespace</A></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,               <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)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a namespace to the output stream If the prefix argument to this method is the empty string, "xmlns", or null this method will delegate to writeDefaultNamespace</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeProcessingInstruction(java.lang.String)">writeProcessingInstruction</A></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;target)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a processing instruction</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeProcessingInstruction(java.lang.String, java.lang.String)">writeProcessingInstruction</A></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;target,                           <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;data)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a processing instruction</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeStartDocument()">writeStartDocument</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write the XML Declaration.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeStartDocument(java.lang.String)">writeStartDocument</A></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;version)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write the XML Declaration.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeStartDocument(java.lang.String, java.lang.String)">writeStartDocument</A></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;encoding,                   <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;version)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write the XML Declaration.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeStartElement(java.lang.String)">writeStartElement</A></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;localName)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a start tag to the output.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeStartElement(java.lang.String, java.lang.String)">writeStartElement</A></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)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a start tag to the output</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/xml/stream/XMLStreamWriter.html#writeStartElement(java.lang.String, java.lang.String, java.lang.String)">writeStartElement</A></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,                  <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,                  <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)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes a start tag to the output</TD></TR></TABLE>&nbsp;<P><!-- ============ 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="writeStartElement(java.lang.String)"><!-- --></A><H3>writeStartElement</H3><PRE>void <B>writeStartElement</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;localName)                       throws <A HREF="../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></PRE><DL><DD>Writes a start tag to the output.  All writeStartElement methods open a new scope in the internal namespace context.  Writing the corresponding EndElement causes the scope to be closed.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>localName</CODE> - local name of the tag, may not be null<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></CODE></DL></DD></DL><HR><A NAME="writeStartElement(java.lang.String, java.lang.String)"><!-- --></A><H3>writeStartElement</H3><PRE>void <B>writeStartElement</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)                       throws <A HREF="../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></PRE><DL><DD>Writes a start tag to the output<P><DD><DL><DT><B>Parameters:</B><DD><CODE>namespaceURI</CODE> - the namespaceURI of the prefix to use, may not be null<DD><CODE>localName</CODE> - local name of the tag, may not be null<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></CODE> - if the namespace URI has not been bound to a prefix and javax.xml.stream.isPrefixDefaulting has not been set to true</DL></DD></DL><HR><A NAME="writeStartElement(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>writeStartElement</H3><PRE>void <B>writeStartElement</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,                       <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,                       <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)                       throws <A HREF="../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></PRE><DL><DD>Writes a start tag to the output<P><DD><DL><DT><B>Parameters:</B><DD><CODE>localName</CODE> - local name of the tag, may not be null<DD><CODE>prefix</CODE> - the prefix of the tag, may not be null<DD><CODE>namespaceURI</CODE> - the uri to bind the prefix to, may not be null<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></CODE></DL></DD></DL><HR><A NAME="writeEmptyElement(java.lang.String, java.lang.String)"><!-- --></A><H3>writeEmptyElement</H3><PRE>void <B>writeEmptyElement</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)                       throws <A HREF="../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></PRE><DL><DD>Writes an empty element tag to the output<P><DD><DL><DT><B>Parameters:</B><DD><CODE>namespaceURI</CODE> - the uri to bind the tag to, may not be null<DD><CODE>localName</CODE> - local name of the tag, may not be null<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></CODE> - if the namespace URI has not been bound to a prefix and javax.xml.stream.isPrefixDefaulting has not been set to true</DL></DD></DL><HR><A NAME="writeEmptyElement(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3>writeEmptyElement</H3><PRE>void <B>writeEmptyElement</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,                       <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,                       <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)                       throws <A HREF="../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></PRE><DL><DD>Writes an empty element tag to the output<P><DD><DL><DT><B>Parameters:</B><DD><CODE>prefix</CODE> - the prefix of the tag, may not be null<DD><CODE>localName</CODE> - local name of the tag, may not be null<DD><CODE>namespaceURI</CODE> - the uri to bind the tag to, may not be null<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></CODE></DL></DD></DL><HR><A NAME="writeEmptyElement(java.lang.String)"><!-- --></A><H3>writeEmptyElement</H3><PRE>void <B>writeEmptyElement</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;localName)                       throws <A HREF="../../../javax/xml/stream/XMLStreamException.html" title="class in javax.xml.stream">XMLStreamException</A></PRE><DL><DD>Writes an empty element tag to the output<P><DD><DL><DT><B>Parameters:</B><DD><CODE>localName</CODE> - local name of the tag, may not be null<DT><B>Throws:</B>

⌨️ 快捷键说明

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