public class XMLWriter extends IndentingWriter
| Modifier and Type | Field and Description |
|---|---|
int |
BODY_SECTION |
protected static int |
defaultSectionCount |
protected String |
encoding |
protected boolean |
header |
int |
HEADER_SECTION |
protected Stack |
tags |
protected String |
xmlVersion |
crDone, indentLevel, indentStringbufferCount, curOut, INITIAL_BUFFER_CAPACITY, listOut, selectStack| Constructor and Description |
|---|
XMLWriter() |
XMLWriter(boolean header) |
XMLWriter(String encoding) |
XMLWriter(String encoding,
String xmlVersion) |
| Modifier and Type | Method and Description |
|---|---|
void |
endTag() |
void |
endTag(boolean useCr) |
void |
finishStartTag()
Finish the start tag, and we expect to have children
(ie, that means the client will call endTag).
|
void |
finishStartTag(boolean children,
boolean useCr) |
int |
insertSectionAfter(int sectionNum)
Insert a custom section after another section.
|
void |
reset()
Reset the buffers so that you can use it again.
|
void |
startTag(String tag) |
void |
startTag(String tag,
boolean finish) |
void |
startTag(String namespace,
String tag) |
void |
startTag(String namespace,
String tag,
boolean finish) |
void |
startTag(String namespace,
String tag,
String attributeString) |
void |
startTag(String namespace,
String tag,
String attributeString,
boolean finish) |
beforeWriteHook, cr, getIndent, indent, indentLeft, indentOneLevel, indentRight, insertAdditionalBuffers, setIndent, write, writecr, writecr, writecr, writecr, writeToanyContent, close, ensureCapacity, flush, getBuffer, getCurrentPosition, popSelect, pushSelect, select, setFirst, truncateAtPosition, write, write, write, write, write, write, write, write, write, write, write, write, write, write, writeNext, writeNext, writeNext, writeNext, writeTo, writeTo, writeToprotected String xmlVersion
protected String encoding
protected boolean header
protected Stack tags
public int HEADER_SECTION
public int BODY_SECTION
protected static final int defaultSectionCount
public XMLWriter()
public XMLWriter(boolean header)
public XMLWriter(String encoding)
public int insertSectionAfter(int sectionNum)
public void reset()
GenBufferreset in class IndentingWriterpublic void startTag(String tag) throws IOException
IOExceptionpublic void startTag(String tag, boolean finish) throws IOException
IOExceptionpublic void startTag(String namespace, String tag) throws IOException
IOExceptionpublic void startTag(String namespace, String tag, boolean finish) throws IOException
IOExceptionpublic void startTag(String namespace, String tag, String attributeString) throws IOException
IOExceptionpublic void startTag(String namespace, String tag, String attributeString, boolean finish) throws IOException
finish - Whether or not to add the finishing ">", if not then
setFirst(" ") is called anticipating the addition of
attributes.attributeString - The attributes. Make sure to XML escape.IOExceptionpublic void finishStartTag()
throws IOException
IOExceptionpublic void finishStartTag(boolean children,
boolean useCr)
throws IOException
children - if false, then there are no children, and
endTag is called automatically.IOExceptionpublic void endTag()
throws IOException
IOExceptionpublic void endTag(boolean useCr)
throws IOException
IOExceptionCopyright © 2017–2019 Eclipse Foundation. All rights reserved.