1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Sat Jan 02 02:58:02 GMT 1999 -->
<title>
Class com.jclark.xml.output.XMLWriter
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a> <a href="tree.html">Class Hierarchy</a> <a href="Package-com.jclark.xml.output.html">This Package</a> <a href="com.jclark.xml.output.UTF8XMLWriter.html#_top_">Previous</a> <a href="Package-com.jclark.xml.output.html">Next</a> <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
Class com.jclark.xml.output.XMLWriter
</h1>
<pre>
java.lang.Object
|
+----java.io.Writer
|
+----com.jclark.xml.output.XMLWriter
</pre>
<hr>
<dl>
<dt> public abstract class <b>XMLWriter</b>
<dt> extends Writer
</dl>
An extension of <code>Writer</code> for writing XML documents.
The normal <code>write</code> methods write character data,
automatically escaping markup characters.
<p>
<hr>
<a name="index"></a>
<h2>
<img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
<dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#XMLWriter(java.lang.Object)"><b>XMLWriter</b></a>(Object)
<dd>
</dl>
<h2>
<img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#attribute(java.lang.String, java.lang.String)"><b>attribute</b></a>(String, String)
<dd> Writes an attribute.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#cdataSection(java.lang.String)"><b>cdataSection</b></a>(String)
<dd> Writes a CDATA section.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#characterReference(int)"><b>characterReference</b></a>(int)
<dd> Writes a character reference.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#comment(java.lang.String)"><b>comment</b></a>(String)
<dd> Writes a comment.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#endAttribute()"><b>endAttribute</b></a>()
<dd> Ends an attribute.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#endElement(java.lang.String)"><b>endElement</b></a>(String)
<dd> Ends an element.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#endReplacementText()"><b>endReplacementText</b></a>()
<dd> Ends the replacement text for an internal entity.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#entityReference(boolean, java.lang.String)"><b>entityReference</b></a>(boolean, String)
<dd> Writes an entity reference.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#markup(java.lang.String)"><b>markup</b></a>(String)
<dd> Writes markup.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#processingInstruction(java.lang.String, java.lang.String)"><b>processingInstruction</b></a>(String, String)
<dd> Writes a processing instruction.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#startAttribute(java.lang.String)"><b>startAttribute</b></a>(String)
<dd> Starts an attribute.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#startElement(java.lang.String)"><b>startElement</b></a>(String)
<dd> Starts an element.
<dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
<a href="#startReplacementText()"><b>startReplacementText</b></a>()
<dd> Starts the replacement text for an internal entity.
</dl>
<a name="constructors"></a>
<h2>
<img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="XMLWriter"></a>
<a name="XMLWriter(java.lang.Object)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>XMLWriter</b>
<pre>
protected XMLWriter(Object lock)
</pre>
<a name="methods"></a>
<h2>
<img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="startElement(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="startElement"><b>startElement</b></a>
<pre>
public abstract void startElement(String name) throws IOException
</pre>
<dl>
<dd> Starts an element.
This may be followed by zero or more calls to <code>attribute</code>.
The start-tag will be closed by the first following call to any method
other than <code>attribute</code>.
<p>
</dl>
<a name="attribute(java.lang.String, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="attribute"><b>attribute</b></a>
<pre>
public abstract void attribute(String name,
String value) throws IOException
</pre>
<dl>
<dd> Writes an attribute.
This is not legal if there have been calls to methods other than
<code>attribute</code> since the last call to <code>startElement</code>,
unless inside a <code>startAttribute</code>, <code>endAttribute</code>
pair.
<p>
</dl>
<a name="startAttribute(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="startAttribute"><b>startAttribute</b></a>
<pre>
public abstract void startAttribute(String name) throws IOException
</pre>
<dl>
<dd> Starts an attribute.
This writes the attribute name, <code>=</code> and the opening
quote.
This provides an alternative to <code>attribute</code>
that allows markup to be included in the attribute value.
The value of the attribute is written using the normal
<code>write</code> methods;
<code>endAttribute</code> must be called at the end
of the attribute value.
Entity and character references can be written using
<code>entityReference</code> and <code>characterReference</code>.
<p>
</dl>
<a name="endAttribute()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="endAttribute"><b>endAttribute</b></a>
<pre>
public abstract void endAttribute() throws IOException
</pre>
<dl>
<dd> Ends an attribute.
This writes the closing quote of the attribute value.
<p>
</dl>
<a name="endElement(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="endElement"><b>endElement</b></a>
<pre>
public abstract void endElement(String name) throws IOException
</pre>
<dl>
<dd> Ends an element.
This may output an end-tag or close the current start-tag as an
empty element.
<p>
</dl>
<a name="processingInstruction(java.lang.String, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="processingInstruction"><b>processingInstruction</b></a>
<pre>
public abstract void processingInstruction(String target,
String data) throws IOException
</pre>
<dl>
<dd> Writes a processing instruction.
If <code>data</code> is non-empty a space will be inserted automatically
to separate it from the <code>target</code>.
<p>
</dl>
<a name="comment(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="comment"><b>comment</b></a>
<pre>
public abstract void comment(String body) throws IOException
</pre>
<dl>
<dd> Writes a comment.
<p>
</dl>
<a name="entityReference(boolean, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="entityReference"><b>entityReference</b></a>
<pre>
public abstract void entityReference(boolean isParam,
String name) throws IOException
</pre>
<dl>
<dd> Writes an entity reference.
<p>
</dl>
<a name="characterReference(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="characterReference"><b>characterReference</b></a>
<pre>
public abstract void characterReference(int n) throws IOException
</pre>
<dl>
<dd> Writes a character reference.
<p>
</dl>
<a name="cdataSection(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="cdataSection"><b>cdataSection</b></a>
<pre>
public abstract void cdataSection(String content) throws IOException
</pre>
<dl>
<dd> Writes a CDATA section.
<p>
</dl>
<a name="startReplacementText()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="startReplacementText"><b>startReplacementText</b></a>
<pre>
public abstract void startReplacementText() throws IOException
</pre>
<dl>
<dd> Starts the replacement text for an internal entity.
The replacement text must be ended with
<code>endReplacementText</code>.
This enables an extra level of escaping that protects
against the process of constructing an entity's replacement
text from the literal entity value.
See Section 4.5 of the XML Recommendation.
Between a call to <code>startReplacementText</code>
and <code>endReplacementText</code>, the argument to
<code>markup</code> would specify entity replacement text;
these would be escaped so that when processed as
a literal entity value, the specified entity replacement text
would be constructed.
This call does not itself cause anything to be written.
<p>
</dl>
<a name="endReplacementText()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="endReplacementText"><b>endReplacementText</b></a>
<pre>
public abstract void endReplacementText() throws IOException
</pre>
<dl>
<dd> Ends the replacement text for an internal entity.
This disables the extra level of escaping enabled by
<code>startReplacementText</code>.
This call does not itself cause anything to be written.
<p>
</dl>
<a name="markup(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="markup"><b>markup</b></a>
<pre>
public abstract void markup(String str) throws IOException
</pre>
<dl>
<dd> Writes markup. The characters in the string will be written as is
without being escaped (except for any escaping enabled by
<code>startReplacementText</code>).
<p>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a> <a href="tree.html">Class Hierarchy</a> <a href="Package-com.jclark.xml.output.html">This Package</a> <a href="com.jclark.xml.output.UTF8XMLWriter.html#_top_">Previous</a> <a href="Package-com.jclark.xml.output.html">Next</a> <a href="AllNames.html">Index</a></pre>
</body>
</html>
|