1 package com.freemindcafe.serialization.sample5;
5 import java.io.BufferedReader;
6 import java.io.DataInputStream;
8 import java.io.FileInputStream;
9 import java.io.IOException;
10 import java.io.InputStreamReader;
11 import java.util.Date;
13 import org.
apache.activemq.util.JettisonMappedXmlDriver;
16 import com.thoughtworks.xstream.io.xml.StaxDriver;
18 import junit.framework.Assert;
25 String filePath = currentDir()+
"/src/com/freemindcafe/serialization/sample5";
26 String fileName =
"Employee.xml";
27 BufferedReader br = null;
28 final StringBuilder req =
new StringBuilder();
31 final File file =
new File(filePath +
"/" + fileName);
33 final DataInputStream in =
new DataInputStream(
new FileInputStream(
34 file.getAbsolutePath()));
35 br =
new BufferedReader(
new InputStreamReader(in));
38 while ((strLine = br.readLine()) != null) {
41 }
catch (IOException e) {
48 Assert.assertNotNull(nikhilFromXml.someDate);
Xstream and Jettison based serialization Jackson is arguably the standard Java Library for processing...