How to use XML Technologies

In this article I have described how XML is used in various Technologies.
  • 1695

XML Technologies

Introduction

Exchanging of information within the business world can be achieve from Extensible Markup Language . Today exchange of data, documents etc was plagued by the existence of thousands of different formats, XML in very short time become the best way of  exchange information . For example when you shop on the internet or using a search engine, or check all the possible train connections between Delhi and Mumbai all information streams are in XML.

There are some reason Why has XML has reach big heights in such a short interval

  • XML is easily readable or we can say it us user friendly.
  • XML is Unicode .The Unicode character set includes al the characters of almost all the written languages in the world. So you can have the same document in German , French , Italian , Russian ect .
  • XML is hierarchical data. This facilitates exchange of the information.
  • XML is machine-independent. So we can't exchange data between Windows, Unix and McIntosh .

Document Type Definition (DTD)

When information is exchange, user can agree on the format. But unfortunately, thousands of formats exist. This misery is over when using XML. For many applications, it may be useful to use a common data structure. Such a data structure is described in either a DTD or in an XML-Schema. This describe how the data is organized and what its hierarchy is. ,There are many communities which has  already agreed upon a common data structure. As such, many XML-extensions have seen the light in the recent years, e.g. MathML (Mathematical XML), CML (Chemical XML), BSML (Bioinformatics Sequence Markup Language), GEML (Gene Expression Markup Language) . They all enable the exchange of information between members in a community.

Here is a code that will explain DTD better

<!DOCTYPE test PUBLIC "//this/is/a/URI/test" "test.dtd" [

  <!NOTATION TeX  PUBLIC "//this/is/a/URI/TextID" "//TextID">

  <!ENTITY ent1 "this is an entity">

  <!ENTITY % ent2 "#PCDATA | subel2">

  <!ENTITY % extent1 PUBLIC "//this/is/a/URI/extent1" "more.txt">

  <!ENTITY extent2 PUBLIC "//this/is/a/URI/extent2" "more.txt">

  <!ENTITY unpsd PUBLIC "//this/is/a/URI/me.gif" "me.gif" NDATA TeX>

  <?test Do this?>

  <!--this is a comment-->

  <!ELEMENT subel2 (#PCDATA)>

  <!ELEMENT subel1 (subel2 | el4)+>

  <!ELEMENT el1 (#PCDATA)>

  <!ELEMENT el2 (#PCDATA | subel2)*>

  <!ELEMENT el3 (#PCDATA | subel2)*>

  <!ELEMENT el4 (#PCDATA)>

  <!ELEMENT el5 (#PCDATA | subel1)*>

  <!ELEMENT el6 (#PCDATA)>

  <!ATTLIST subel1

       size (big | small) "big"

       shape (round | square) #REQUIRED>

  <!ATTLIST el5

       el5satt CDATA #IMPLIED>

]>

XML Schema
There were some disadvantages of DTD
  • DTD are not written in XML, which means that developers must learn to work with yet another technology and language.
  • Data typing in DTD is weak ,that is everything is declared as text.
Known as a successor of DTD .XML-Schema is written in XML .This means that the same technology can be used for reading and processing.

Further Readings 

You may also want to read these related articles :

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.