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
Develop a desktop application with Lync 2013 Project Description: We want to make desktop application which interfaces to Lync 2013 ? Skills required are .NET, ASP, Java,

Create a class called DeckOfCards that stores 52 objects of the Card class. Include methods to shuffle the deck, deal a deck, and report the number of cards left in the deck. The s

YES. JSP technology is extensible by the development of custom actions, or tags, which are encapsulated in tag libraries. #question..

1. Which of the following are not valid Java identifiers, and why? (a) wolVes (b) United(there is only one) (c) 87 (d) 5 3 (e) Real ale (f) isFound?by 2. A class Television

Automated the claim sub-system: Insurance Domain:       CIA-MI   Type                                         Development - Web-based Application Role

do you have example of a simple midlet game ?


SMTP (Simple Mail Transfer Protocol) permits two mail servers to communicate using a easy language, and gives a step-by-step protocol for exchanging information. SMTP delivers m

Android App Project Description: I am seeking an experienced individual to prepare a small android application The only difference is that I would like movement to be done

Question: a) Authentication relies on standards and protocols that are used to confirm the identity of a user or object. Windows Server 2003 supports several types of network