I have problem with serialization.
I have XML :
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped"/>
<ds:Transform Algorithm="http://www.w3.org/TR/2001/REC"/>
</ds:Transforms>
Tag Transform is empty but has attribute.
Pojo Transforms:
@Data
public class Transforms {
@JacksonXmlProperty(localName = "Transform")
@JacksonXmlElementWrapper
private List<Transform> transform;
}
Pojo Transform:
@Data
public class Transform {
@JacksonXmlProperty(isAttribute = true, localName = "Algorithm")
private String algorithm;
}
When I serialize the given XML, the incoming result is:
Transforms(transform=[])
How could I get the list of two Transform with field algorithm ?