⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xmlwriter.html

📁 java编程java编程java编程java编程java编程java编程java编程
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Wed Nov 20 13:02:07 CET 2002 -->
<TITLE>
XmlWriter
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="XmlWriter";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 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>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/lowagie/text/xml/XmlToXXX.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="XmlWriter.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT>  <!--  if(window==top) {    document.writeln('<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT><A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.lowagie.text.xml</FONT>
<BR>
Class  XmlWriter</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">java.lang.Object</A>
  |
  +--<A HREF="../../../../com/lowagie/text/DocWriter.html">com.lowagie.text.DocWriter</A>
        |
        +--<B>com.lowagie.text.xml.XmlWriter</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/lowagie/text/DocListener.html">DocListener</A>, <A HREF="../../../../com/lowagie/text/ElementListener.html">ElementListener</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/EventListener.html">EventListener</A></DD>
</DL>
<HR>
<DL>
<DT>public class <B>XmlWriter</B><DT>extends <A HREF="../../../../com/lowagie/text/DocWriter.html">DocWriter</A><DT>implements <A HREF="../../../../com/lowagie/text/DocListener.html">DocListener</A></DL>

<P>
A <CODE>DocWriter</CODE> class for XML (Remark: this class is not finished yet!). <P> An <CODE>XmlWriter</CODE> can be added as a <CODE>DocListener</CODE> to a certain <CODE>Document</CODE> by getting an instance. Every <CODE>Element</CODE> added to the original <CODE>Document</CODE> will be written to the <CODE>OutputStream</CODE> of this <CODE>XmlWriter</CODE>. <P> Example: <BLOCKQUOTE><PRE> // creation of the document with a certain size and certain margins Document document = new Document(PageSize.A4, 50, 50, 50, 50); try {    // this will write XML to the Standard OutputStream    <STRONG>XmlWriter.getInstance(document, System.out);</STRONG>    // this will write XML to a file called text.html    <STRONG>XmlWriter.getInstance(document, new FileOutputStream("text.xml"));</STRONG>    // this will write XML to for instance the OutputStream of a HttpServletResponse-object    <STRONG>XmlWriter.getInstance(document, response.getOutputStream());</STRONG> } catch(DocumentException de) {    System.err.println(de.getMessage()); } // this will close the document and all the OutputStreams listening to it <STRONG>document.close();</CODE> </PRE></BLOCKQUOTE>
<P>

<P>
<HR>

<P>
<!-- ======== NESTED 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>static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/xml/XmlWriter.html#DOCTYPE">DOCTYPE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the reference to the DTD.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/xml/XmlWriter.html#DTD">DTD</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the place where the DTD is located.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/TreeMap.html">TreeMap</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/xml/XmlWriter.html#itext">itext</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the meta information of the document.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/xml/XmlWriter.html#PROLOG">PROLOG</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is the first line of the XML page.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/xml/XmlWriter.html#xmlCode">xmlCode</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is an array containing character to XML translations.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="fields_inherited_from_class_com.lowagie.text.DocWriter"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class com.lowagie.text.<A HREF="../../../../com/lowagie/text/DocWriter.html">DocWriter</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/lowagie/text/DocWriter.html#closeStream">closeStream</A>, <A HREF="../../../../com/lowagie/text/DocWriter.html#document">document</A>, <A HREF="../../../../com/lowagie/text/DocWriter.html#EQUALS">EQUALS</A>, <A HREF="../../../../com/lowagie/text/DocWriter.html#FORWARD">FORWARD</A>, <A HREF="../../../../com/lowagie/text/DocWriter.html#GT">GT</A>, <A HREF="../../../../com/lowagie/text/DocWriter.html#LT">LT</A>, <A HREF="../../../../com/lowagie/text/DocWriter.html#NEWLINE">NEWLINE</A>, <A HREF="../../../../com/lowagie/text/DocWriter.html#open">open</A>, <A HREF="../../../../com/lowagie/text/DocWriter.html#os">os</A>, <A HREF="../../../../com/lowagie/text/DocWriter.html#pageSize">pageSize</A>, <A HREF="../../../../com/lowagie/text/DocWriter.html#pause">pause</A>, <A HREF="../../../../com/lowagie/text/DocWriter.html#QUOTE">QUOTE</A>, <A HREF="../../../../com/lowagie/text/DocWriter.html#SPACE">SPACE</A>, <A HREF="../../../../com/lowagie/text/DocWriter.html#TAB">TAB</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== 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 ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/xml/XmlWriter.html#XmlWriter(com.lowagie.text.Document, java.io.OutputStream)">XmlWriter</A></B>(<A HREF="../../../../com/lowagie/text/Document.html">Document</A>&nbsp;doc,          <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html">OutputStream</A>&nbsp;os)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an <CODE>XmlWriter</CODE>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/xml/XmlWriter.html#XmlWriter(com.lowagie.text.Document, java.io.OutputStream, java.lang.String)">XmlWriter</A></B>(<A HREF="../../../../com/lowagie/text/Document.html">Document</A>&nbsp;doc,          <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html">OutputStream</A>&nbsp;os,          <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html">String</A>&nbsp;dtd)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs an <CODE>XmlWriter</CODE>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== 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>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/xml/XmlWriter.html#add(com.lowagie.text.Element)">add</A></B>(<A HREF="../../../../com/lowagie/text/Element.html">Element</A>&nbsp;element)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Signals that an <CODE>Element</CODE> was added to the <CODE>Document</CODE>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>(package private) static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/lowagie/text/xml/XmlWriter.html#addTabs(java.lang.StringBuffer, int)">addTabs</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/StringBuffer.html">StringBuffer</A>&nbsp;buf,        int&nbsp;indent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a number of tabs to a <CODE>StringBuffer</CODE>.</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="../../../../com/lowagie/text/xml/XmlWriter.html#close()">close</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Signals that the <CODE>Document</CODE> was closed and that no other <CODE>Elements</CODE> will be added.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">

⌨️ 快捷键说明

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