Tuesday 27 November 2012

Introduction to XML








XML Processor
An application used to access and process and XML document is known as an XML processor. XDocument is the name of the XML processor used in C#.

XML is a data object created from one or more files. It can have two kinds of structure associated with it a physical structure and a logical structure.

An XML processor must support UTF-8 and UTF-16.

Physical Structure
The physical structure of an XML document is a set of entities. There are two types of entities parsed and un-parsed.
The DTD can be use to check if the XML is valid and it can be used to store commonly used text.

We can also include binary entities such as images into an XML document. 

Parsed Entities
A parsed entity represents text that is parsed by an XML processor. It will always have at least one entity a document entity with no DTD. Parsed entities replace the text the entity.

Un-parsed entity
Un-parsed entity are used to include non XML data in an XML file. It must have an identity and a type.

Entity both parsed and un-paresd are added to the DTD document.

Logical structure
The logical structure of an XML file is an abstraction of the physical structure of the XML. This is the hierarchy of an XML document.