XStream – Attribute Aliasing
Xstream Attribute aliasing is used to serialize a member variable as an XML attribute. Let us modify our example again and add the following code to it. xstream.useAttributeFor(Student.class, "studentName"); xstream.aliasField("name",…