Hello Florent,
I don't think are are any general rules per se. Most people tend to prefer one over the other. I personally would use elements as much as possible as they are more flexible. You shouldn't use attributes if there is the slightest chance you might want to break up the value into smaller values. i.e. for age an attribute is ok, for a name I personally would use an element (as you might want to store first name, middle name, ... separately).
From the database perspektive, there is not difference in speed whether you use an attribute or an element. So only the model of your data should be relevant to your schema.
Cheers, Dirk On 12/27/2014 07:23 PM, Florent Gallaire wrote:
Hello,
When creating a XML file for usage as database with BaseX, is there some policy about when it's good to use an element and when it's good to use an attribut ?
Cheers,
Florent