Package io.kojan.xml
Interface XMLDumper
-
public interface XMLDumperA 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 voiddumpEndElement()Writes a sequence that ends previously started XML element.<Type,Bean>
voiddumpEntity(Entity<Type,Bean> entity, Type value)Serializes givenEntityinto XML form.voiddumpStartElement(java.lang.String tag)Writes a sequence that starts an XML element with given tag.voiddumpText(java.lang.String text)Writes XML text content.
-
-
-
Method Detail
-
dumpStartElement
void dumpStartElement(java.lang.String tag) throws XMLExceptionWrites 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 XMLExceptionWrites 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 XMLExceptionWrites 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 givenEntityinto 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
-
-