Restful controller and xml updates

Hi to all the crew,

I cannot figure out if is there a way to create/update an object and its associations with a single xml using a restful controller (put or post method)

Does anyone know how to handle this task (or tell me which is the best solution ?)...

For example:

Role (has many users through LinkUserRole)
User (has many users through LinkUserRole)
LinkUserRole (interface)

Now, I know very well how to hanldle the association of user/roles into controller for html input but how can I do when I receive an xml ?
Which elements must be presente into the xml ?

Someone has an example ?

Many thanks in advance...