0943555226
New Member
I am using simple-xml to perform XML serialization/deserialization in my Java application. I have a class as follows:\[code\]@Root(name="config")public class Config{ @Element(name="update_interval") private int updateInterval; @Element(name="timestamp") private long timestamp; //... //...}\[/code\]Now, this would produce XML like the following:\[code\]<config> <update_interval>2000</update_interval> <timestamp>1234567890</timestamp></config>\[/code\]Question:How can I override the element name at runtime, so that in some cases, the XML reads as follows?\[code\]<config> <updt_int>2000</updt_int> <ts>1234567890</ts></config>\[/code\]