It is necessary to deserialize xml of this type. I wrote such code using the library simple-xml :
@Root public class Valute { @Attribute public String ID; @Element public Integer NumCode; @Element public String CharCode; @Element public Integer Nominal; @Element public String Name; @Element public Double Value; } @Root public class ValCurs { @Attribute public Date Date; @Attribute(name = "name", required = false) public String Name; @ElementList(inline = true, required = false) public List<Valute> Valutes; public Valute get(final String charCode) { for (Valute valute : Valutes) { if (valute.CharCode.equals(charCode)) return valute; } return null; } public static ValCurs parse(String xml) throws Exception { DateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy"); RegistryMatcher m = new RegistryMatcher(); m.bind(Date.class, new DateFormatTransformer(dateFormat)); Reader reader = new StringReader(xml); Persister serializer = new Persister(m); return serializer.read(ValCurs.class, reader, false); } } But when deserializing, I get in the Valutes field - null. How to fix it?