Comments on: XML Design Patterns – element vs. attribute http://amazing-development.com/archives/2005/02/14/xml-design-patterns/ ruby, java and the rest Sun, 20 Mar 2011 15:23:26 +0000 hourly 1 http://wordpress.org/?v=3.1 By: Dan http://amazing-development.com/archives/2005/02/14/xml-design-patterns/comment-page-1/#comment-65830 Dan Wed, 26 Sep 2007 17:12:07 +0000 http://www.spychalski.de/blog/archives/2005/02/14/xml-design-patterns/#comment-65830 One issue with attributes is mentioned in the developerworks article: If the information should not be normalized for white space, use elements. One issue with attributes is mentioned in the developerworks article: If the information should not be normalized for white space, use elements.

]]>
By: Software Pari http://amazing-development.com/archives/2005/02/14/xml-design-patterns/comment-page-1/#comment-151 Software Pari Mon, 11 Apr 2005 00:43:58 +0000 http://www.spychalski.de/blog/archives/2005/02/14/xml-design-patterns/#comment-151 Hi Nice article. I guess 2 things help us to answer this question (what I have gathered from various articles on net): 1. Is is the metadata or imp piece of information? - eg If we wish to give an ID to an entity to distinguish it from other entities of the same type, then it should be an attribute, else element. An element is that piece of info which user himself is aware of. 2. If there is some element which for sure would not have some attribute defining it further in the future, convert it to an attribute. But weight it against point 1. Thanks & regards Software Pari Hi

Nice article.
I guess 2 things help us to answer this question (what I have gathered from various articles on net):

1. Is is the metadata or imp piece of information? – eg If we wish to give an ID to an entity to distinguish it from other entities of the same type, then it should be an attribute, else element. An element is that piece of info which user himself is aware of.

2. If there is some element which for sure would not have some attribute defining it further in the future, convert it to an attribute. But weight it against point 1.

Thanks & regards
Software Pari

]]>