XML vs HTML

By: Emiley J Emailed: 1610 times Printed: 2079 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

Some new programmers tend to think that XML is a replacement for HTML. It is NOT. XML and HTML were designed with different goals in mind. XML was designed to transport and store data, with focus on what data is where as HTML was designed to display data, with focus on how data looks. So HTML is about displaying information,
while XML is about transporting information.

Another thing to note is that XML Does Not DO Anything!

XML was created to structure, store, and transport information. So you will have to use some other technology or programming language to handle and process XML document in order to DO something.

The following example is a note to the teacher , from a student, stored as XML:

 

<note>
<to>teacher</to>
<from>student</from>
<heading>Leave</heading>
<body>I was sick yesterday</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 maybe in Java,C++,ASP,PHP etc to send this note, receive or display it somewhere.

 

With XML You can add 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. So you can add your own tags as necessary. Therefore there are no predefined tags or the so called keywords that you have to use in XML.  This is in contrast to HTML where the tags are predefined and if you use your own tag it will be ignored by the browsers.


xml Home | All xml Tutorials | Latest xml Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(1)


1. View Comment

I tried ....so this is best solution for understanding ..

View Tutorial          By: rehnuma at 2015-03-30 12:29:38

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Emiley J
Password must include both numeric and alphabetic characters - Magento
What is Hadoop?
Returning multiple values from a web service
Tomcat and httpd configured in port 8080 and 80
Java Webservices using Netbeans and Tomcat
Java WebService connected to Database
How to Deploy a Java Web Service
Call a webservice in Java
Java WebService - Create your first web service in Java
package javax.jws does not exist
Getting Started with Android
HTML5 Location - getCurrentPosition() in HTML5
HTML5 Canvas - Using Canvas in HTML5
HTML5 - Introduction
HTML5 Video - Handling video in HTML5

More Tutorials in xml
XML vs HTML
Error: File does not exist: crossdomain.xml in your server error logs
Error: File does not exist: labels.rdf in your server error logs
What is the structure of an XML?
XHTML Basics

More Latest News
Most Viewed Articles (in xml )
XML vs HTML
XHTML Basics
Error: File does not exist: crossdomain.xml in your server error logs
What is the structure of an XML?
Error: File does not exist: labels.rdf in your server error logs
Most Emailed Articles (in xml)
XML vs HTML
XHTML Basics
What is the structure of an XML?
Error: File does not exist: labels.rdf in your server error logs
Error: File does not exist: crossdomain.xml in your server error logs