public class XMLWriter extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AMPERSAND_ENTITY |
static String |
APOSTROPHE_ENTITY |
static String |
GREATER_THAN_ENTITY |
static String |
LESS_THAN_ENTITY |
static String |
QUOTE_ENTITY |
Constructor and Description |
---|
XMLWriter(Writer writer) |
XMLWriter(Writer writer,
int indent) |
XMLWriter(Writer writer,
int indent,
String crlf) |
public static final String LESS_THAN_ENTITY
public static final String GREATER_THAN_ENTITY
public static final String AMPERSAND_ENTITY
public static final String APOSTROPHE_ENTITY
public static final String QUOTE_ENTITY
public XMLWriter(Writer writer)
public XMLWriter(Writer writer, int indent)
public void setEncoding(String encoding)
public String getEncoding()
public void putXmlns(String uri)
public void setIndent(int indent)
public int getIndent()
public void setCRLF(String crlf)
public String getCRLF()
public void setWriter(Writer writer)
public Writer getWriter()
public void setEmitHeader(boolean emitHeader)
public boolean isEmitHeader()
public void flush() throws IOException
IOException
public void close() throws IOException
IOException
public XMLWriter write(String text) throws IOException
IOException
public void indent(String text) throws IOException
IOException
public XMLWriter element(String name) throws IOException
IOException
public XMLWriter start() throws IOException
IOException
public XMLWriter end() throws IOException
IOException
public XMLWriter content(String text) throws IOException
IOException
public XMLWriter econtent(String text) throws IOException
IOException
public XMLWriter content(boolean value) throws IOException
IOException
public XMLWriter content(Date value) throws IOException
IOException
public XMLWriter text(String text) throws IOException
IOException
public XMLWriter etext(String text) throws IOException
IOException
public XMLWriter attr(String name, Object value) throws IOException
IOException
public XMLWriter eattr(String name, Object value) throws IOException
IOException
public XMLWriter xmlns(String value) throws IOException
IOException
public XMLWriter xmlns(String name, String value) throws IOException
IOException
public XMLWriter attr(String name) throws IOException
IOException
public XMLWriter string(String value) throws IOException
IOException
public XMLWriter object(Object value) throws IOException
IOException
public XMLWriter date(Date value) throws IOException
IOException
public XMLWriter integer(long value) throws IOException
IOException
public XMLWriter number(double value) throws IOException
IOException
public XMLWriter bool(String name, boolean value) throws IOException
IOException
public XMLWriter integer(String name, long value) throws IOException
IOException
public XMLWriter number(String name, double value) throws IOException
IOException
public XMLWriter date(String name, Date value) throws IOException
IOException
public XMLWriter element(QName name) throws IOException
IOException
public XMLWriter attr(QName name, Object value) throws IOException
IOException
public XMLWriter eattr(QName name, Object value) throws IOException
IOException
public XMLWriter attr(QName name) throws IOException
IOException
public XMLWriter bool(QName name, boolean value) throws IOException
IOException
public XMLWriter integer(QName name, long value) throws IOException
IOException
public XMLWriter number(QName name, double value) throws IOException
IOException
public XMLWriter date(QName name, Date value) throws IOException
IOException
public static final String escapeBodyValue(Object value)
Escape the toString
of the given object. For use as body text.
value
- escape value.toString()
Copyright © 2015 Nuxeo SA. All rights reserved.