3 ms·
The first one. Where you'd do attributes is like this: <foo type="address"> bar </foo> <nested type="resident_list"> <nested_foo type="resident"
by theshrike79 1y ago
The first one.
Where you'd do attributes is like this:
<foo type="address">
bar
</foo>
<nested type="resident_list">
<nested_foo type="resident">
nested_bar
</nested_foo>
</nested>
A shitty example (you'd define types with schema), but you get the point.
The data is in the tags, attributes are metadata, extra information that's needed during the process.
This is what JSON is lacking, you can't give metadata to data, like defining types. The type definition needs to live NEXT to the data in special keys you need to check every time when parsing.