3 ms·
Particularly annoying is that there's no way to do lists with attributes. Looks good: <user name="alice" group="wheel" /> Oh no: <user name="alice" group
by twic 7y ago
Particularly annoying is that there's no way to do lists with attributes. Looks good:
<user name="alice" group="wheel" />
Oh no:
<user name="alice" groups="wheel admin sudoers" />
Or is it one of:
<user name="alice" groups="wheel,admin,sudoers" />
<user name="alice" groups="wheel:admin:sudoers" />
<user name="alice" groups="wheel;admin;sudoers" />
Or give up and use elements:
<user name="alice">
<group>wheel</group>
<group>admin</group>
<group>sudoers</group>
</user>
Hold on, should there be a container?
<user name="alice">
<groups>
<group>wheel</group>
<group>admin</group>
<group>sudoers</group>
</groups>
</user>
XML really needs either richer attributes, or no attributes.
- Ooolin 7y agoReplace 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>