self close tag issue xstream when null

Playemethenly

New Member
I have an class like below and I use xSteam to convert Edge to xml.\[code\]@XStreamAlias("edge")class Edge{ @XStreamAsAttribute @XStreamAlias("source") private String source; @XStreamAsAttribute @XStreamAlias("target") private String target; @XStreamAlias("data") private Data data; .....}\[/code\]When I set data=http://stackoverflow.com/questions/11543904/null, i can get \[code\] <edge source="8" target="10" />\[/code\]but I want to get below when data =http://stackoverflow.com/questions/11543904/null\[code\] <edge source="8" target="10" ></edge>\[/code\]Some one can help for this?
 
Back
Top