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

BoardColoring.java program for 2D MXM matrix

Explain BIOS in java language? BIOS basically stand for Basic input/output system it is also called as the system BIOS or ROM BIOS is a de facto standard describing a firmware

I need help on java homework. Is it possible to know the shortest possible time to get the solution before giving my commitment

Can you help? this assignment I will need to build a very straightforward and fully functional machine learning classifier with the K-Nearest Neighbor (KNN) algorithm. The KNN mode

What limitations are placed on method overriding ?

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

i need help

An Action Class performs a role of an adapter among the contents of an incoming HTTP request and the corresponding business logic that should be implemented to process this request

What is Multiple Inheritance ? A few object oriented languages, notably C++, permits a class to inherit from more than one unrelated class. This is known as multiple inheritanc