How to serialize a <String, String> map using Simple XML?
How are you going to serialize the map using simple XML so that it looks something like this:
<elem foo="value">key</elem>
Instead of the usual
<elem foo="key">value</elem>
(The map is one for many, and since it will be edited by people, I would like it to be clearer.)
[EDIT]: Not a fix.
+5
1 answer
Have you tried something like:
@ElementMap(entry="property", value="value", attribute=true, inline=true)
private Map<String, String> map;
or some combination, i.e. also use other @ElementMap annotation attributes ?
+6