public class XmlWriter extends AbstractWriter
XmlModelCDATA_BEG, CDATA_END, COMMENT_BEG, COMMENT_END, config, FORMATTER, FORWARD_SLASH, HTML_DOCTYPE, indentationEnabled, NBSP, out, SPACE, XML_2QUOT, XML_AMPERSAND, XML_APOSTROPHE, XML_GT, XML_HEADER, XML_LT| Constructor and Description |
|---|
XmlWriter()
Default constructor a zero offset
|
XmlWriter(@NotNull Appendable out)
Writer constructor with a zero offset
|
XmlWriter(@NotNull Appendable out,
@NotNull CharSequence indentationSpace)
A writer constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected @NotNull XmlWriter |
write(int level,
@Nullable CharSequence name,
@Nullable Map<String,Object> attributes,
@Nullable List<Object> children,
@NotNull XmlModel element)
Render the XML code without header
|
@NotNull XmlWriter |
write(int level,
@NotNull XmlModel element)
Render the XML code without header
|
createWriter, getWriter, getWriterEscaped, toString, write, writeNewLine, writeRawValue, writeValuepublic XmlWriter()
public XmlWriter(@NotNull
@NotNull Appendable out)
public XmlWriter(@NotNull
@NotNull Appendable out,
@NotNull
@NotNull CharSequence indentationSpace)
out - A writerindentationSpace - String for a one level offset.@NotNull public final @NotNull XmlWriter write(int level, @NotNull @NotNull XmlModel element) throws IOException
IOException@NotNull protected @NotNull XmlWriter write(int level, @Nullable @Nullable CharSequence name, @Nullable @Nullable Map<String,Object> attributes, @Nullable @Nullable List<Object> children, @NotNull @NotNull XmlModel element) throws IOException
level - Element nesting level.name - Name of element where the null is allowed for an AJAX responsesattributes - Attributes of the elementchildren - Childern of the element including null itemselement - Original elementIOExceptionCopyright 2015, Pavel Ponec