I am currently developing a system that uses XStream to create objects from XML. An example object would be\[code\]@XStreamAlias("TestClass")public class TestClass{@XStreamAlias("format")private String format;public String getFormat(){ return format;}public void setFormat(String format){ this.format = format;}}\[/code\]This class has one field, a format field, and the XML from which it would be constructed would look like:\[code\]<TestClass> <format>foo</format></TestClass>\[/code\]Now I would like to instantiate different instances of this class, with a specific format. For instance I would like a TestClass object with format foo and one with format bar. But instead of producing\[code\]<TestClass> <format>foo</format></TestClass><TestClass> <format>bar</format></TestClass>\[/code\]I want to use an alias system of some sort so that the above XML would not be necessary but instead I could use\[code\]<TestClassFoo /><TestClassBar />\[/code\]where of course the name does not need to include the format specified.I see that there has to be a custom converter, but I again do not want to hard code every alias, but instead load these from XML as well (yes, it get complicated). The result of this would be to create shortcut templates for different XML objects, which can be configured dynamically.Many thanks in advance!