Hi Martin,

Martin Minka wrote:

> I would like to produce from a HashMap following XML:
> <a id="map_key">map_value</a>
> 
> I tried:
> @XStreamImplicit(keyFieldName = "a")
> @XStreamConverter(MyMapConverter.class)
> HashMap<String, String> map = new HashMap<String, String>();
> 
> But this combination never enters MyMapConverter.
> 
> Is there a way to achieve this ?

No. Implicit collections/arrays/maps are a hack in the generic converters 
(e.g. ReflectionConverter) to skip the "implicit" container and write their 
elements like own elements. Therefore is no converter required/called for 
the map. Your converter is only called without the implicit declaration.

- Jörg


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to