Suppose I want to store many small configuration objects in XML, and I don\'t care too much about the format. The XMLDecoder class built into the JDK would work, and from what I
Addition to @jay answer with example:
Code:
PortfolioAlternateIdentifier identifier = new PortfolioAlternateIdentifier();
identifier.setEffectiveDate(new Date());
identifier.setSchemeCode("AAA");
identifier.setIdentifier("123456");
The output using XStream:
2014-05-02 20:14:15.961 IST
AAA
123456
The output using XMLEncoder: