I have something like this

public class Example
{
        MyMap<String,Object> metaData;
}

MyMap implements Map and stores it's data in a map using the composition
pattern.
Where object is either another map or list implementation or a wrapper
for a String.

The (near) default mapping currently produces something like this (with
just the string wrapping object):

<example>
        <metaData>
                <key>key1</key><value><>value1</></value>
        </metaData>
        <metaData>
                <key>key2</key><value><>value2</></value>
        </metaData>
        <metaData>
                <key>key3</key><value><>value3</></value>
        </metaData>
        <metaData>
                <key>key4</key><value><>value4</></value>
        </metaData>
</example>

Is it possible use a mapping file to stop the metaData element from
repeating, to use the key in the sub element name and supress the value
and empty tag e.g:

<example>
        <metaData>
                <key1>value1</key1>
                <key2>value2</key2>
                <key3>value3</key3>
                <key4>value4</key4>
        </metaData>
</example>

Is this behaviour considered ba? I am not interested in unmarshalling.

Thanks,

Tim.

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

    http://xircles.codehaus.org/manage_email


Reply via email to