tripilmessutt
New Member
I have Person Object (for example), and wheni convert them to the XML file with XStream,it's looks like this:\[code\]<person> <name> Bob </name> <accounts> <account> 12345 </account> <account> 23456 </account> <account> 34567 </account> </accounts></person>\[/code\]I want to make it look like next file:\[code\]<person> <name> Bob </name> <accounts> 12345, 23456, 34567 </accounts></person>\[/code\]Please tell me, if i can do this with XStream. And how can i do this?Aliases can only replace one tag to another. I have tryed to use \[code\]registerLocalConverter\[/code\] method for this, override marshal method in Converter class, and set parameters \[code\](Person.class, "account", new PersonConverter());\[/code\]but I had no success. How can i change marshal method only for one tag, in case when i'm using \[code\]registerConverter\[/code\] (not \[code\]registerLocalConverter\[/code\]) method?Please, help me. Thanks!