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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
dumpEndElement()
Writes a sequence that ends previously started XML element.<Type,Bean>
voiddumpEntity(Entity<Type,Bean> entity, Type value)
Serializes givenEntity
into XML form.void
dumpStartElement(java.lang.String tag)
Writes a sequence that starts an XML element with given tag.void
dumpText(java.lang.String text)
Writes XML text content.
-
-
-
Method Detail
-
dumpStartElement
void dumpStartElement(java.lang.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(java.lang.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 givenEntity
into XML form.- Type Parameters:
Type
- data type of entityBean
- type of bean associated with the entity- Parameters:
entity
- the entity type to serializevalue
- the object to serialize- Throws:
XMLException
- in case exception occurs during XML serialization
-
-