Class XmlWriter

java.lang.Object
org.ujorm.tools.xml.AbstractWriter
org.ujorm.tools.xml.model.XmlWriter

public class XmlWriter extends AbstractWriter
If you need special formatting, overwrite responsible methods.
Since:
1.88
Author:
Pavel Ponec
See Also:
  • Constructor Details

    • XmlWriter

      public XmlWriter()
      Default constructor a zero offset
    • XmlWriter

      public XmlWriter(@NotNull @NotNull Appendable out)
      Writer constructor with a zero offset
    • XmlWriter

      public XmlWriter(@NotNull @NotNull Appendable out, @NotNull @NotNull CharSequence indentationSpace)
      A writer constructor
      Parameters:
      out - A writer
      indentationSpace - String for a one level offset.
  • Method Details

    • write

      @NotNull public final @NotNull XmlWriter write(int level, @NotNull @NotNull XmlModel element) throws IOException
      Render the XML code without header
      Throws:
      IOException
    • write

      @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
      Render the XML code without header
      Parameters:
      level - Element nesting level.
      name - Name of element where the null is allowed for an AJAX responses
      attributes - Attributes of the element
      children - Childern of the element including null items
      element - Original element
      Returns:
      This
      Throws:
      IOException