Package io.kojan.xml

Interface XMLDumper


public interface XMLDumper
A facility to serialize data in in XML format. Allows serialization of entities and writing of any other data.
Author:
Mikolaj Izdebski
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Writes a sequence that ends previously started XML element.
    <Type, Bean>
    void
    dumpEntity(Entity<Type,Bean> entity, Type value)
    Serializes given Entity into XML form.
    void
    Writes a sequence that starts an XML element with given tag.
    void
    Writes XML text content.
  • Method Details

    • dumpStartElement

      void dumpStartElement(String tag) throws XMLException
      Writes a sequence that starts an XML element with given tag.
      Parameters:
      tag - element tag name
      Throws:
      XMLException - in case exception occurs during XML serialization
    • dumpEndElement

      void dumpEndElement() throws XMLException
      Writes a sequence that ends previously started XML element.
      Throws:
      XMLException - in case exception occurs during XML serialization
    • dumpText

      void dumpText(String text) throws XMLException
      Writes XML text content.
      Parameters:
      text - text content to write
      Throws:
      XMLException - in case exception occurs during XML serialization
    • dumpEntity

      <Type, Bean> void dumpEntity(Entity<Type,Bean> entity, Type value) throws XMLException
      Serializes given Entity into XML form.
      Type Parameters:
      Type - data type of entity
      Bean - type of bean associated with the entity
      Parameters:
      entity - the entity type to serialize
      value - the object to serialize
      Throws:
      XMLException - in case exception occurs during XML serialization