Which is better to store data as attributes or as elements? , JAVA Programming

 

A question rising in the mind of XML/DTD designers is whether to model and encode retain information using an attribute, or alternatively, using an element.

1. Using  an  element:  Lord  of  the  Ring...:  If  you  consider  the  information  in question to be part of the essential material that is being communicated or expressed in the XML, put it in an element

2. Using an attribute: : If you consider the information to be incidental or peripheral  to  the  main  interaction,  or  purely  intended  to  help  applications  process  the  main interaction, use attributes.

The principle is data goes in components and metadata goes in attributes.  Elements are also useful when they occupy special characters like "<", ">", etc which are harder to accept in attributes. The most important reason to use component is its extensibility. It is far simpler to build child elements to reflect complex content than to split an attribute into pieces. You may use attributes along with components to refine your understanding of that element with extra information.

 

Posted Date: 7/27/2012 4:46:39 AM | Location : United States







Related Discussions:- Which is better to store data as attributes or as elements? , Assignment Help, Ask Question on Which is better to store data as attributes or as elements? , Get Answer, Expert's Help, Which is better to store data as attributes or as elements? Discussions

Write discussion on Which is better to store data as attributes or as elements?
Your posts are moderated
Related Questions
What is 'public static void main (String args[ ] ) ' signifies? Access specifier is the 'public' keyword. 'static' keyword allows main() to called without instantiating

Define network organization? What are important features of network organization? Network Organization : Network organization is an inter firm organization in which is charac

Can we use the constructor, instead of init(), to initialize servlet? Ans) Yes. Of course you can use the constructor instead of init(). There's nothing to stop you. But you sho

Project Description: We prepare and operate smartphone application.(Picture sharing and social networking) But there are problems in server side. It's very slow. So we

how to write java programe and example programe

Differentiate uni-Processor OS from Multi-Processor OS? Uni-processor OS : Uni-processor OS'es is designed to schedule tasks on a single uPs just whereas Multiprocessor O

Player Ship Appearance: • Your ship must be either a nice-looking sphere (left image above), or a nice-looking sphere with a "mouth" (middle image above), depending on variant.

What do you mean about networking support in Java ?

What is difference between time slicing and preemptive scheduling? Differences between preemptive and time scheduling are: In case of Preemptive scheduling the highest prior

UnsupportedClassVersionError