public class XmlWriter extends AbstractWriter
XmlModel
CDATA_BEG, CDATA_END, COMMENT_BEG, COMMENT_END, config, FORWARD_SLASH, HTML_DOCTYPE, CHAR_SPACE, indentationEnabled, out, 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,
String 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, toString, write, writeNewLine, writeRawValue, writeValue
public XmlWriter()
public XmlWriter(@Nonnull Appendable out)
public XmlWriter(@Nonnull Appendable out, @Nonnull String 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, @Nonnull CharSequence name, @Nullable Map<String,Object> attributes, @Nullable List<Object> children, @Nonnull XmlModel element) throws IOException
level
- Element nesting level.name
- Name of elementattributes
- Attributes of the elementchildren
- Childern of the element including null
itemselement
- Original elementIOException
Copyright 2019-2022, Pavel Ponec