public class XmlWriter extends AbstractWriter
XmlModel
CDATA_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(Appendable out)
Writer constructor with a zero offset
|
XmlWriter(Appendable out,
CharSequence indentationSpace)
A writer constructor
|
Modifier and Type | Method and Description |
---|---|
protected XmlWriter |
write(int level,
CharSequence name,
Map<String,Object> attributes,
List<Object> children,
XmlModel element)
Render the XML code without header
|
XmlWriter |
write(int level,
XmlModel element)
Render the XML code without header
|
createWriter, getWriter, getWriterEscaped, toString, write, writeNewLine, writeRawValue, writeValue
public XmlWriter()
public XmlWriter(@Nonnull Appendable out)
public XmlWriter(@Nonnull Appendable out, @Nonnull CharSequence indentationSpace)
out
- A writerindentationSpace
- String for a one level offset.@Nonnull public final XmlWriter write(int level, @Nonnull XmlModel element) throws IOException
IOException
@Nonnull protected XmlWriter write(int level, @Nullable CharSequence name, @Nullable Map<String,Object> attributes, @Nullable List<Object> children, @Nonnull 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 elementIOException
Copyright 2019-2022, Pavel Ponec