added a comment - - edited
I saw that you have some support but it doesn't really work. can we discuss
about enhanceing it?
1. Map as root type:
The following code does not work:
Map lMap = new HashMap();
lMap.put("PATH","tmp");
final StringWriter lStringWriter = new StringWriter();
Marshaller.marshal(lMap,lStringWriter);
final String s = lStringWriter.toString();
The result is:
<hash-map empty="false" empty="false"/>
2. Map as part of another object does work, but
2a. the resulting xml does not short any difference between HashMap and Hashtable
Your impl:
<m><m xsi:type="java:org.exolab.castor.mapping.MapItem"
xmlns:xsi="http:><key
xsi:type="java:java.lang.String">PATH</key><value
xsi:type="java:java.lang.String">tmp</value></m></m>
My impl:
<m><m xsi:type="java:java.util.HashMap"
xmlns:xsi="http:><entry><key
xsi:type="java:java.lang.String">PATH</key><value
xsi:type="java:java.lang.String">tmp</value></entry></m></m>
2b. the xsi type refers to an internal castor type which is not very nice.
The class descriptor implementation works on your framework and does not need
the special handling you did in the main code, which IMO is normally better
And the result looks very much like your result.
It would be great if you could reconsider your decission.
Created an attachment (id=659)
Map Descriptor