XML - What is XML?

What is XML?

XML, Extensible Markup Language, is an open, text based markup language that provides structural and semantic information to data. XML is a metalanguage that can be used to create other language. It is used to structure and describe data that can be understood by other applications. Using XML, we can separate the user interface from data.

Features of XML:

1. XML is a generalized markup language that means one can define his/her own tag sets.
2. A valid XML document contains rules and is self-describing.
3. The rules that are found in DTD allow the documents to be validated.

Describe the logical structure of XML.

XML documents comprise of declaration, elements and comments

XML Declaration
It identifies the version to which XML conforms
<?xml version = "1.0"?>

Document Type Declaration
It consists of markup code that indicates grammar rules or Document Type Definition (DTD) for the particular class of document.
<! DOCTYPE Car SYSTEM "cr.dtd">

This statement tells the XML processor that the document is of the class Car that conforms the rules specified in the DTD "cr.dtd".

Document element
The document element contains data of an XML document.

Why is XML so popular?

Due to the following advantages of using XML, it has become popular:

1. It supports Unicode. Therefore documents written in any human language can be communicated.
2. Data structures: records, lists and trees can be represented using XML.
3. Its format describes structure, field names and their specific values too. Its therefore called self-documenting.
4. Its syntax and parsing requirements make the necessary parsing algorithms very simple, efficient, and consistent.
5. It can be used as a document storage and processing format.
6. It is platform-independent.

Why is XML referred as self-describing data?

- Text labels inside of XML's syntactic delimiters that cause most people to think that XML is self-describing. But these tags aren't part of XML.
- Choosing the terms used for tags or naming anything is often a difficult and contentious activity. Everyone naturally creates names that make sense to them.
- However, XML is not self describing.

Why is XML extensible?

Extensibility is another attribute of XML. XML is short of "eXtensible Markup Language. This is so because a developer may easily create his own XML syntax for any applications he wishes to use it for. Any other developer, once having learned how to use his own language's XML parsing routines, can use any XML-based format currently available.

XML is a secured language for information exchange over the network. Explain

- Applications require a secure exchange of structured data. XML encryption can ensure this by providing end-to-end security as it is iitself a widely used data structuring technology.
- XML encryption addresses the issues not covered in by the TLS which are encrypting part of the data that is being exchanged and secure sessions between multiple parties.
- XML Encryption can handle XML as well as binary data.
XML document - List the rules to be followed by an XML document.
XML document - They must have a root tag, the document should be well formed : the tags should be properly closed, since XML is case sensitive, one should take care.....
XML DTD - Define DTD (Document Type definition).
XML DTD is a rule book that an XML document follows. Once DTD is ready, you can create number of XML documents following the same rules......
XML CDATA section - What is a CDATA section in XML?
XML CDATA section - The term CDATA is used when you dont want some text data to be parsed by the XML parser....
Post your comment