cedarsoft Serialization provides several base classes that can be extended. When you prefer to use your own serializing technology, you can create your own backend.
This backend is based on the new - and very fast and comfortable - XML api added to JDK 1.6 (JSR-173).
No external libraries are necessary to use the Stax backend. But it is suggested to add Woodstox or another Stax aware XML processor to improve the performance.
Serializers should extend AbstractStaxSerializer.
<dependency> <groupId>com.cedarsoft.serialization</groupId> <artifactId>stax</artifactId> <version>4.0.7</version> </dependency>
Optional Woodstox dependency:
<dependency> <groupId>org.codehaus.woodstox</groupId> <artifactId>woodstox-core-asl</artifactId> <version>4.0.6</version> </dependency>
Stax Mate is a small extension to Stax that offers an improved API to serialize XML. The code looks a bit cleaner and it is saving you a few key strokes.
Since it is based on Stax you get the same performance.
Serializers should extend AbstractStaxMateSerializer.
<dependency> <groupId>com.cedarsoft.serialization</groupId> <artifactId>stax-mate</artifactId> <version>4.0.7</version> </dependency>
Optional Woodstox dependency:
<dependency> <groupId>org.codehaus.woodstox</groupId> <artifactId>woodstox-core-asl</artifactId> <version>4.0.6</version> </dependency>
Custom backends can easily be created. It only takes a few lines of code. There exists an abstract base class for XML based serialization (AbstractXmlSerializer).
Custom backend implementations should extend AbstractSerializer.
<dependency> <groupId>com.cedarsoft.serialization</groupId> <artifactId>serialization</artifactId> <version>4.0.7</version> </dependency>