XStream with xml and java object -


i have 2 java classes....

public class item {     private int itemindex;     private string containertype;     private map<string, list<string>> contenttype;     private string status;     private list<string> remark;      // getters , setters } 

please tell me how convert item object xml , xml item object? have used xstream jar conversion. need store multiple item (list of items) in xml. please provide full coding in java add new item existing items (stored in xml).

sample code

objectoutputstream out = xstream.createobjectoutputstream(somewriter);  out.writeobject(new person("joe", "walnes")); out.writeobject(new person("someone", "else")); out.writeobject("hello"); out.writeint(12345);  out.close(); 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -