All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.io.Writer | +----com.jclark.xml.output.XMLWriter
Writer
for writing XML documents.
The normal write
methods write character data,
automatically escaping markup characters.
protected XMLWriter(Object lock)
public abstract void startElement(String name) throws IOException
attribute
.
The start-tag will be closed by the first following call to any method
other than attribute
.
public abstract void attribute(String name, String value) throws IOException
attribute
since the last call to startElement
,
unless inside a startAttribute
, endAttribute
pair.
public abstract void startAttribute(String name) throws IOException
=
and the opening
quote.
This provides an alternative to attribute
that allows markup to be included in the attribute value.
The value of the attribute is written using the normal
write
methods;
endAttribute
must be called at the end
of the attribute value.
Entity and character references can be written using
entityReference
and characterReference
.
public abstract void endAttribute() throws IOException
public abstract void endElement(String name) throws IOException
public abstract void processingInstruction(String target, String data) throws IOException
data
is non-empty a space will be inserted automatically
to separate it from the target
.
public abstract void comment(String body) throws IOException
public abstract void entityReference(boolean isParam, String name) throws IOException
public abstract void characterReference(int n) throws IOException
public abstract void cdataSection(String content) throws IOException
public abstract void startReplacementText() throws IOException
endReplacementText
.
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 startReplacementText
and endReplacementText
, the argument to
markup
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.
public abstract void endReplacementText() throws IOException
startReplacementText
.
This call does not itself cause anything to be written.
public abstract void markup(String str) throws IOException
startReplacementText
).
All Packages Class Hierarchy This Package Previous Next Index