public class XmlWriter extends IndentWriter
| Modifier and Type | Method and Description |
|---|---|
void |
attr(String name,
Object value) |
void |
attr(String name,
String value) |
void |
attrForDomApi(String name,
String value)
Renders attribute with string value, complying to
DOM API 5.2 Character Escaping
http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping
|
void |
cdata(String s)
Writes string data.
|
void |
close()
XMLWriters cannot be closed: ignore.
|
void |
dumpBean(Object o) |
void |
endTag(boolean complete) |
void |
init(Writer w,
int taglvl) |
void |
startTag(String tn) |
void |
tag(String tn) |
void |
tag(String tn,
Object... ar) |
void |
tag(String tn,
String... attrvalueset) |
void |
tag(String tn,
String attrs)
Writes a new XML tag.
|
void |
tagendnl() |
void |
tagfull(String tn)
Writes a complete tag (open AND close) without attributes.
|
void |
tagfull(String tn,
boolean onoff)
Writes a tag, a #text content and the end tag on one line.
|
void |
tagfull(String tn,
Boolean onoff)
Writes a tag, a #text content and the end tag on one line.
|
void |
tagfull(String tn,
Date dt)
Writes a tag, a #text content and the end tag on one line.
|
void |
tagfull(String tn,
int val)
Writes a tag, a #text content and the end tag on one line.
|
void |
tagfull(String tn,
long val)
Writes a tag, a #text content and the end tag on one line.
|
void |
tagfull(String tn,
Number val) |
void |
tagfull(String tn,
String text)
Writes a tag, a #text content and the end tag on one line.
|
void |
tagfull(String tn,
String attrs,
String text)
Writes a tag with the given attributes, a #text content and the end tag on one line.
|
void |
tagnl(String tn,
String... attrvalueset) |
void |
tagonly(String tn,
String... attrvalueset)
Outputs a tag AND parameters ONLY, i.e.
|
void |
tagonlynl(String tn,
String... attrvalueset) |
void |
unclosed() |
void |
wraw(String s)
Writes data without replacing stuff; it does expand newlines to indent.
|
void |
writeAttr(String name,
String value) |
dec, flush, forceNewline, getStdoutWriter, getWriter, inc, indent, isIndentEnabled, print, println, println, setInd, setIndentEnabled, setSpacesPerIndent, write, write, writeRaw, writeRaw, writeRawpublic XmlWriter()
public XmlWriter(Writer w)
public void init(Writer w, int taglvl)
init in class IndentWriterpublic void wraw(String s) throws IOException
s - IOExceptionpublic void writeAttr(String name, String value) throws IOException
IOExceptionpublic void cdata(String s) throws IOException
IOExceptionpublic void unclosed()
public void tag(String tn, String attrs) throws IOException
tn - The tag name without bracesattrs - attributes.IOExceptionpublic void tagnl(String tn, String... attrvalueset) throws IOException
IOExceptionpublic void tag(String tn, String... attrvalueset) throws IOException
IOExceptionpublic void startTag(String tn) throws IOException
IOExceptionpublic void attr(String name, String value) throws IOException
IOExceptionpublic void attrForDomApi(String name, String value) throws IOException
name - value - IOExceptionpublic void endTag(boolean complete)
throws IOException
IOExceptionpublic void tagonly(String tn, String... attrvalueset) throws IOException
tn - attrvalueset - IOExceptionpublic void tagonlynl(String tn, String... attrvalueset) throws IOException
IOExceptionpublic void tag(String tn) throws IOException
IOExceptionpublic void tagfull(String tn) throws IOException
tag - IOExceptionpublic void tagfull(String tn, String text) throws IOException
tag - text - IOExceptionpublic void tagfull(String tn, Date dt) throws IOException
tag - text - IOExceptionpublic void tagfull(String tn, String attrs, String text) throws IOException
tag - attrs - text - IOExceptionpublic void tagfull(String tn, int val) throws IOException
tag - text - IOExceptionpublic void tagfull(String tn, long val) throws IOException
tag - text - IOExceptionpublic void tagfull(String tn, Number val) throws IOException
IOExceptionpublic void tagfull(String tn, boolean onoff) throws IOException
tag - text - IOExceptionpublic void tagfull(String tn, Boolean onoff) throws IOException
tag - text - IOExceptionpublic void tagendnl()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class IndentWriterIOExceptionCloseable.close()public void dumpBean(Object o) throws IOException
IOExceptionCopyright © 2017 etc.to. All rights reserved.