I am making an Object to serialize XML using XStream. What do you not see “obvious” with this serializer? Once you get it hanging is very simple.
In the above example, you might have something like this:
...
XStream xstream = new XStream(new DomDriver());
xstream.alias("myclass", MyClass.class);
xstream.aliasField("countTotal", MyClass.class, "totalCountValue");
String xml = xstream.toXML(this);
...
for this class of samples:
class MyClass {
private int totalCountValue;
public MyClass() {
}
}
, - "", , , . ...
- XStream