Xstream handling tree map in java object attribute

SahJasedege

New Member
I'm working on an object that i need to convert to xml and viceversa. The object im working on has an attribute called properties which is a TreeMap.\[code\]TreeMap<String, int[]> properties = new TreeMap<String, int[]>();\[/code\]when I use xstream to build the xml i get something like this\[code\]<properties class="tree-map">***</properties>\[/code\]The thing is that when I use that xml to build the object I get an exception unless I escape the \"tree-map\". How can I build the object back from the xml built by xstream?
 
Back
Top