4 ms·
There's no ambiguity at all. Attributes are what fields are to a record; basically everything goes into attributes. Child elements are other records and are use
by Mikhail_Edoshin 6y ago
There's no ambiguity at all. Attributes are what fields are to a record; basically everything goes into attributes. Child elements are other records and are used when either there's more than one or their order is important or they also appear as children of other elements. Text is only used when there is actual content for humans that XML delineates; when XML is used as "application/xml" :) data there should be no text (unless parts of your data are such text).
- afiori 6y agoMore than "fields to a record" the difference between attributes and elements is that attributes cannot be nested. So in a sense if you are trying to write JSON in XML all base values should be in attributes.