C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » XML »

XML Structure


Posted Date: 12 Jul 2009    Resource Type: Articles    Category: XML
Author: chiragMember Level: Gold    
Rating: 1 out of 5Points: 8



Types of XML structure



There are two kind of structure in XML.
• Physical structure
• Logical structure

Physical Structure - Arrangement of entities gives a physical structure.

Entity – A unit of information or a storage object. A document entity is an entity which contains all other entity.
Entities can reference other entities and can cause them to be included in the XML document. They can be internal or external.

e.g.

[home.page]
[head]
[title]
[banner]
[body]
[main.title]
[rule]
[text]
[para]
[footer]


Logical Structure - Arrangement of the elements gives a logical structure.
Each XML doc must have only one root element and all the other elements must be perfectly nested inside that element.
This means that if an element contains other element, those elements must be completely enclosed within that element.

Hence, we can logically represent XML doc as a tree like structure with root element at the top of the tree.
• The elements that are inside an element are called its children.
• Elements that share the same parent elements are called siblings.

Sample XML doc


<home.page>
<head>
<title> My home page </title>
<banner> source=”topbanner.gif” </banner>
</head>
<body>
<'main.title>Welcome to my home page </main.title>
<rule/>
<text>
<para>
Sorry, this page is still under construction.
Please come back soon !
</para>
</text>
</body>
<footer source=”foo.gif”> </footer>
</home.page>


And you can use the elements accordingly to the needs of the application.



Responses

Author: Miss Meetu Choudhary    13 Jul 2009Member Level: Diamond   Points : 1
Hi Chirag,
Your resource is good enough but you forgot to format the angular brackets which is done by me. So your 2 points are reduced. Please Take care of this in future resources.

++
Thanks and Regards.
Meetu Choudhary.
Site Coordinator.


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
XML Structure  .  XML Doc  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: XHTML
Previous Resource: XML support in .net framework
Return to Discussion Resource Index
Post New Resource
Category: XML


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use