I would like to serialize an object to an XML of this form with XStream.
text
The value of the node
Just another way of doing it:
@XStreamAlias("My") private static class My { private String field; } XStream xStream = new XStream(); xStream.autodetectAnnotations(true); xStream.useAttributeFor(My.class, "field");