Oh.... the joys of transformation:

I am trying to use a loopback driver to sanitize some group memberships.
I am trying to make the following operation into a modify instead of an
add (since the object already exists, the add fails)


<input>
<add cached-time="20171122101638.284Z" class-name="User" dest-
dn="\ORGMETA\dk\users\aa" event-id="meta6#20171122101638#1#1:64910d54-
bb9c-41a6-8772-540d91649cbb" qualified-src-dn="O=dk\OU=users\CN=aa" src-
dn="\ORGMETA\dk\users\aa" src-entry-id="37481" timestamp="1511345798#1">
<association state="manual"></association>
<add-attr attr-name="Group Membership">
<value type="string">\ORGMETA\dk\structures\depts\Bib</value>
</add-attr>
<add-attr attr-name="Group Membership">
<value type="string">\ORGMETA\dk\structures\depts\Femkl</value>
</add-attr>
</add>
<!-- Here i did remove some modify operations on other objects. They
are perfectly fine-->
</input>


I suppose it should look like this (more or less)


<input>
<modify class-name="User" dest-dn="\ORGMETA\dk\users\aa">
<modify-attr attr-name="Group Membership">
<add-value>
<value type="string">\ORGMETA\dk\structures\depts\Bib</value>
</add-value>
<add-value>
<value type="string">\ORGMETA\dk\structures\depts\Femkl</value>
</add-value>
</modify-attr>
</modify>
<!-- Here i did remove some modify operations on other objects. They
are perfectly fine-->
</input>


Can anyone tell me how to go about that (I would love an example).