Wanna Learn XML Basics then click here to download the file for
What is an XML
Note:
>> XML was designed to transport and store data, with focus on what the data is.
>> HTML was designed to display data, with focus on how the data looks like.
XML does not DO anything. XML was created to structure, store, and transport information.
Example:
The following example is a note to Tove, from Jani, stored as XML:
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
The note above is quite self descriptive. It has sender and receiver information, it also has a heading and a message body. But still, this XML document does not DO anything. It is just information wrapped in tags.
Someone must write a piece of software to send, receive or display it.
The tags in the example above (like <to> and <from>) are not defined in any XML standard. These tags are "invented" by the author of the XML document.That is because the XML language has no predefined tags.
The tags used in HTML are predefined. HTML documents can only use tags defined in the HTML standard (like <p>, <h1>, etc.).
XML allows the author to define his/her own tags and his/her own document structure.
It is important to understand that XML is not a replacement for HTML. In most web applications, XML is used to transport data, while HTML is used to format and display the data.
Simply XML is a software- and hardware-independent tool for carrying information.
XML is the most common tool for data transmissions between all sorts of applications.
XML is used in many aspects of web development, often to simplify data storage and sharing.
XML Separates Data from HTML:
XML is Used to Create New Internet Languages.Here are some examples:
- XML stands for EXtensible Markup Language
- XML is a markup language much like HTML
- XML was designed to carry data, not to display data
- XML tags are not predefined. You must define your own tags
- XML is designed to be self-descriptive
- XML is a W3C Recommendation.
Note:
>> XML was designed to transport and store data, with focus on what the data is.
>> HTML was designed to display data, with focus on how the data looks like.
XML does not DO anything. XML was created to structure, store, and transport information.
Example:
The following example is a note to Tove, from Jani, stored as XML:
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
The note above is quite self descriptive. It has sender and receiver information, it also has a heading and a message body. But still, this XML document does not DO anything. It is just information wrapped in tags.
Someone must write a piece of software to send, receive or display it.
With XML You can Invent Your Own Tags
The tags in the example above (like <to> and <from>) are not defined in any XML standard. These tags are "invented" by the author of the XML document.That is because the XML language has no predefined tags.
The tags used in HTML are predefined. HTML documents can only use tags defined in the HTML standard (like <p>, <h1>, etc.).
XML allows the author to define his/her own tags and his/her own document structure.
It is important to understand that XML is not a replacement for HTML. In most web applications, XML is used to transport data, while HTML is used to format and display the data.
Simply XML is a software- and hardware-independent tool for carrying information.
XML is the most common tool for data transmissions between all sorts of applications.
XML is used in many aspects of web development, often to simplify data storage and sharing.
XML Separates Data from HTML:
- If you need to display dynamic data in your HTML document, it will take a lot of work to edit the HTML each time the data changes.
- With XML, data can be stored in separate XML files. This way you can concentrate on using HTML for layout and display, and be sure that changes in the underlying data will not require any changes to the HTML.
- With a few lines of JavaScript code, you can read an external XML file and update the data content of your web page.
- In the real world, computer systems and databases contain data in incompatible formats.
- XML data is stored in plain text format. This provides a software- and hardware-independent way of storing data.
- This makes it much easier to create data that can be shared by different applications.
- One of the most time-consuming challenges for developers is to exchange data between incompatible systems over the Internet.
- Exchanging data as XML greatly reduces this complexity, since the data can be read by different incompatible applications.
- Upgrading to new systems (hardware or software platforms), is always time consuming. Large amounts of data must be converted and incompatible data is often lost.
- XML data is stored in text format. This makes it easier to expand or upgrade to new operating systems, new applications, or new browsers, without losing data.
- Different applications can access your data, not only in HTML pages, but also from XML data sources.
- With XML, your data can be available to all kinds of "reading machines".
XML is Used to Create New Internet Languages.Here are some examples:
- XHTML
- WSDL for describing available web services.
- WAP and WML as markup languages for handheld devices.
- RSS languages for news feeds.
- SMIL for describing multimedia for the web.