Maybe the XML file that causes the problem could be helpfull:
<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata">
<Export>
<Manufacturer>PEUGEOT</Manufacturer>
<AXCode>B 08</AXCode>
<Date_Time>2005-11-18T15:27:22</Date_Time>
<Model>1007</Model>
<Edition>01/0</Edition>
<New>N</New>
<Body_Style>Sedan</Body_Style>
<Body_Code>Pass.Car</Body_Code>
<WTBplanned>2005-08-10T00:00:00</WTBplanned>
<DeliverytoEC>2005-08-25T00:00:00</DeliverytoEC>
<Compl>15.06.2005</Compl>
<Stups>2005-06-18T00:00:00</Stups>
</Export>
</dataroot>
The code:
class Export
{
String date_Time=null;
String AX_Code =null;
String manufacturer=null;
String model=null;
String edition=null;
String newx=null;
String body_Style=null;
String body_Code=null;
String wTBplanned=null;
String deliverytoEC=null;
String compl=null;
String stups=null;
public String getDate_Time()
{
return date_Time;
}
public void setDate_Time(String date_Time)
{
this.date_Time = date_Time;
}
public String getAXCode()
{
return AX_Code;
}
public void setAXCode(String AX_Code)
{
this.AX_Code = AX_Code;
}
public String getManufacturer()
{
return manufacturer;
}
public void setManufacturer(String manufacturer)
{
this.manufacturer = manufacturer;
}
public String getModel()
{
return model;
}
public void setModel(String model)
{
this.model = model;
}
public String getEdition()
{
return edition;
}
public void setEdition(String edition)
{
this.edition = edition;
}
public String getNewx()
{
return newx;
}
public void setNewx(String newx)
{
this.newx = newx;
}
public String getBody_Style()
{
return body_Style;
}
public void setBody_Style(String body_Style)
{
this.body_Style = body_Style;
}
public String getBody_Code()
{
return body_Code;
}
public void setBody_Code(String body_Code)
{
this.body_Code = body_Code;
}
public String getwTBplanned()
{
return wTBplanned;
}
public void setwTBplanned(String wTBplanned)
{
this.wTBplanned = wTBplanned;
}
public String getDeliverytoEC()
{
return deliverytoEC;
}
public void setDeliverytoEC(String deliverytoEC)
{
this.deliverytoEC = deliverytoEC;
}
public String getCompl()
{
return compl;
}
public void setCompl(String compl)
{
this.compl = compl;
}
public String getStups()
{
return stups;
}
public void setStups(String stups)
{
this.stups = stups;
}
}
class Dataroot
{
ArrayList export=null;
public Dataroot()
{
new ArrayList();
}
}
public void readDe() throws Exception
{
XStream xstream = new XStream();
xstream.alias("dataroot",Dataroot.class);
xstream.alias("Export",Export.class);
xstream.alias("Manufacturer",String.class);
xstream.alias("AXCode",String.class);
File file = new File("./x.xml");
Reader r=new FileReader(file);
Dataroot dc = (Dataroot)xstream.fromXML(r);
Maybe the XML file that causes the problem could be helpfull:
<?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlns:od="urn:schemas-microsoft-com:officedata">
<Export>
<Manufacturer>PEUGEOT</Manufacturer>
<AXCode>B 08</AXCode>
<Date_Time>2005-11-18T15:27:22</Date_Time>
<Model>1007</Model>
<Edition>01/0</Edition>
<New>N</New>
<Body_Style>Sedan</Body_Style>
<Body_Code>Pass.Car</Body_Code>
<WTBplanned>2005-08-10T00:00:00</WTBplanned>
<DeliverytoEC>2005-08-25T00:00:00</DeliverytoEC>
<Compl>15.06.2005</Compl>
<Stups>2005-06-18T00:00:00</Stups>
</Export>
</dataroot>
The code:
class Export
{
String date_Time=null;
String AX_Code =null;
String manufacturer=null;
String model=null;
String edition=null;
String newx=null;
String body_Style=null;
String body_Code=null;
String wTBplanned=null;
String deliverytoEC=null;
String compl=null;
String stups=null;
public String getDate_Time()
{ return date_Time; }public void setDate_Time(String date_Time)
{ this.date_Time = date_Time; }public String getAXCode()
{ return AX_Code; }public void setAXCode(String AX_Code)
{ this.AX_Code = AX_Code; }public String getManufacturer()
{ return manufacturer; }public void setManufacturer(String manufacturer)
{ this.manufacturer = manufacturer; }public String getModel()
{ return model; }public void setModel(String model)
{ this.model = model; }public String getEdition()
{ return edition; }public void setEdition(String edition)
{ this.edition = edition; }public String getNewx()
{ return newx; }public void setNewx(String newx)
{ this.newx = newx; }public String getBody_Style()
{ return body_Style; }public void setBody_Style(String body_Style)
{ this.body_Style = body_Style; }public String getBody_Code()
{ return body_Code; }public void setBody_Code(String body_Code)
{ this.body_Code = body_Code; }public String getwTBplanned()
{ return wTBplanned; }public void setwTBplanned(String wTBplanned)
{ this.wTBplanned = wTBplanned; }public String getDeliverytoEC()
{ return deliverytoEC; }public void setDeliverytoEC(String deliverytoEC)
{ this.deliverytoEC = deliverytoEC; }public String getCompl()
{ return compl; }public void setCompl(String compl)
{ this.compl = compl; }public String getStups()
{ return stups; }public void setStups(String stups)
{ this.stups = stups; }}
class Dataroot
{ new ArrayList(); }{
ArrayList export=null;
public Dataroot()
}
public void readDe() throws Exception
{
XStream xstream = new XStream();
xstream.alias("dataroot",Dataroot.class);
xstream.alias("Export",Export.class);
xstream.alias("Manufacturer",String.class);
xstream.alias("AXCode",String.class);
File file = new File("./x.xml");
Reader r=new FileReader(file);
Dataroot dc = (Dataroot)xstream.fromXML(r);