At work we are being asked to create XML files to pass data to another offline application that will then create a second XML file to pass back in order to update some of ou
XML is all about agreement. First defer to any existing XML schemas or established conventions within your community or industry.
If you are truly in a situation to define your schema from the ground up, here are some general considerations that should inform the element vs attribute decision:
Content
Hierarchical
- Has
- order
Can reference to re-use
For humans
Extreme use leads to document bloat
Unique or non-unique names
SAX parse: read later
DTD: no default value