News for hackers. Stuff that matters.
Re:The havoc the XML purists wrought by sesqu on Thursday May 20, 2010 @05:06AM (#1363573)
There's a semantic difference between an element and an attribute. Unfortunately, XML is specifically used to model element-as-attribute relationships, so a lot of people start wondering about the exact, nebulous, distinction. Elements are the more flexible of the two, but possessing of some quality that you (and many others) wish to avoid.

The difference is much the same as that between native datatypes and objects. Some languages explicitly expose everything as objects, while others contend that, for example, boolean-objects are overkill and downright problematic.

Generally, I use attributes for strongly typed data, and elements for untyped or (semi)structured data. Schemas are vital for typing.

There are no comments on this comment yet.