XML Structure

Tuesday, July 28, 2009

Types of XML structure There are two kind of structure in XML. • Physical structure• Logical structurePhysical 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

source=”topbanner.gif” <'main.title>Welcome to my home page Sorry, this page is still under construction. Please come back soon !



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

0 comments:

Post a Comment

 
 
 
Your Ad Here