Tuesday, August 18, 2009

The infamous XML attribute

Rules for using attributes in XML:
- never use an attribute for anything but a terminal leaf data node in a tree structure
- never use an attribute if you may require multiple nodes with the same name
- never use an attribute for any indistinct data which may require a context markup or status flag
- never use an attribute for string data requiring a lot of escaping <>" etc..
- always use an attribute instead of a text node!

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home