Username: Save?
Password:
Home Forum Links Search Login Register*
    News: Welcome to the TechnoWorldInc! Community!
Recent Updates
[Yesterday at 11:48:22 AM]

[Yesterday at 11:48:22 AM]

[Yesterday at 11:48:22 AM]

[Yesterday at 11:48:22 AM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[February 14, 2024, 02:00:39 PM]
Subscriptions
Get Latest Tech Updates For Free!
Resources
   Travelikers
   Funistan
   PrettyGalz
   Techlap
   FreeThemes
   Videsta
   Glamistan
   BachatMela
   GlamGalz
   Techzug
   Vidsage
   Funzug
   WorldHostInc
   Funfani
   FilmyMama
   Uploaded.Tech
   MegaPixelShop
   Netens
   Funotic
   FreeJobsInc
   FilesPark
Participate in the fastest growing Technical Encyclopedia! This website is 100% Free. Please register or login using the login box above if you have already registered. You will need to be logged in to reply, make new topics and to access all the areas. Registration is free! Click Here To Register.
+ Techno World Inc - The Best Technical Encyclopedia Online! » Forum » THE TECHNO CLUB [ TECHNOWORLDINC.COM ] » Programming Zone » XML
 Beginning XML - Part IV(Basic Schema Of A DTD)
Pages: [1]   Go Down
  Print  
Author Topic: Beginning XML - Part IV(Basic Schema Of A DTD)  (Read 2329 times)
Daniel Franklin
TWI Hero
**********


Karma: 3
Offline Offline

Posts: 16647


View Profile Email
Beginning XML - Part IV(Basic Schema Of A DTD)
« Posted: September 29, 2007, 11:55:20 AM »




In the following two articles, I'm going to wrap up my pondering on XML. We'll explore the basic schema of a DTD, and the future of XML.

Let's recall that some basic features of XML are:

· XML can keep data separated from your HTML · XML can be used to store data inside your HTML documents · XML can be used as a format to exchange information · XML can be used to store data in files or in databases

The power and beauty of XML is that it maintains the separation of the user interface from structured data, allowing the seamless integration of data from diverse sources. Customer information, purchase orders, research results, bill payments, medical records, catalog data and other information can be converted to XML on the middle tier, allowing data to be exchanged online as easily as HTML pages display data today. Data encoded in XML can then be delivered over the Web to the desktop. No retrofitting is necessary for legacy information stored in mainframe databases or documents, and because HTTP is used to deliver XML over the wire, no changes are required for this function.

Once the data is on the client desktop, it can be manipulated, edited, and presented in multiple views, without return trips to the server. Servers now become more scalable, due to lower computational and bandwidth loads. Also, since data is exchanged in the XML format, it can be easily merged from different sources - ok, this is the aspects that personally interests me. The portability of data. Database programmer all over the world face unlimited problems while tackling with data of multifarious formats. If formats cease to matter, anybody, anywhere, on whichever machine, can view and manipulate the data.


>From the previous article, we might recall the XML, unlike HTML, does not have proprietary tags. We can go on a wild trip and define our own tags, according to the necessity. Consider this for example:

<?xml version="1.0"?> <my-schedule> <date>4/17/2001</date> <morning-to-noon> <XML-tutorial> <XML-Introduction>Telling what exactly XML means</XML-Introduction> <XML-Examples>Some Examples of XML</XML-Examples> <XML-Conclusion>Some concluding text</XML-Conclusion> <XML-Email>Email the XML files to Yagna</XML-Email> </XML-tutorial> </morning-to-noon> <noon-to-mid-noon> <nothing-important> Have something light to eat and laze around </nothing-important> </noon-to-mid-noon> <mid-noon-to-evening> <work>Work on a client's web site</work>

</mid-noon-to-evening> ............ <date>4/18/2001</date> .............. </my-schedule>

If you can't make out what this is all about, don't worry. This is just an imaginary schema of a data structure that can be represented through an XML document.

Before you get the time to come to grips with the gory XML introduction, I present a more evolved version of the above mentioned XML code:

<?xml version="1.0"?> <!DOCTYPE my-schedule [ <!ELEMENT my-schedule (date +)> <!ELEMENT date (morning-to-noon, morning-to-mid-noon, mid-noon-to-evening)> <!ELEMENT morning-to-noon (XML-tutorial)> <!ELEMENT XML-tutorial (XML-Introduction, XML-Example, XML-Conclusion, XML-Email)> <!ELEMENT XML-Introduction (#PCDATA)> <!ELEMENT XML-Example (#PCDATA)> <!ELEMENT XML-Conclusion (#PCDATA)> <!ELEMENT XML-Email (#PCDATA)> <!ELEMENT noon-to-mid-noon (nothing-important)> <!ELEMENT nothing-important (#PCDATA) <!ELEMENT mid-noon-to-evening (work +)> <!ELEMENT work (#PCDATA) ]> <my-schedule> <date>4/17/2001</date> <morning-to-noon> <XML-tutorial> <XML-Introduction>Telling what exactly XML means</XML-Introduction> <XML-Examples>Some Examples of XML</XML-Examples> <XML-Conclusion>Some concluding text</XML-Conclusion> <XML-Email>Email the XML Article</XML-Email> </XML-tutorial> </morning-to-noon> <noon-to-mid-noon> <nothing-important> Have something light to eat and laze around </nothing-important> </noon-to-mid-noon> <mid-noon-to-evening> <work>Work on a client's web site</work>

</mid-noon-to-evening> ............ <date>4/18/2001</date> .............. </my-schedule>

The above is a comprehensive example of a DTD - Document Type Definition. XML provides an application independent way of sharing data. With a DTD, independent groups of people can use a common DTD for interchanging data. Your application can use a standard DTD to verify that the data you receive from the outside world is valid. You can also use a DTD to verify your own data.

In this example, the data structure is well defines. Each parent node has a child node, and some child-nodes have grand-child nodes and so on.

Articles Source - Free Articles

Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Copyright © 2006-2023 TechnoWorldInc.com. All Rights Reserved. Privacy Policy | Disclaimer
Page created in 0.086 seconds with 24 queries.