Replace with "Element" with "Class" and "Attribute" with "Property" in your examples.
It's your job to decide how the data should be structured, in any language.
I would do the following :
<user name="alice">
<groups>
<group uid="wheel"/>
<group uid="admin"/>
<group uid="sudoers"/>
</groups>
</user>