1,105,271 Community Members

What is the difference between HTML and xml

Member Avatar
dress237935
Newbie Poster
6 posts since Oct 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

What is the difference between HTML and xml

Member Avatar
tgreer
Made Her Cry
1,885 posts since Dec 2004
Reputation Points: 189 [?]
Q&As Helped to Solve: 45 [?]
Skill Endorsements: 2 [?]
Team Colleague
 
0
 

Both are subsets of, or, are derived from, SGML.

HTML is an SGML used for web page design, help files, and HTA applications.

XML is a more generalized mark-up language typically used for system or application configuration files or data migration projects.

XHTML is a version of HTML that strictly adheres to XML rules.

Member Avatar
jmichae3
Junior Poster
118 posts since Jul 2011
Reputation Points: -1 [?]
Q&As Helped to Solve: 14 [?]
Skill Endorsements: 0 [?]
 
0
 

one way you can relate to it is looking at XML is basically a "custom tag" case-sensitive version of HTML with a mandatory strange-looking header.

it also has things like CDATA stuff for unusual content like javascript.

XML prefers you to convert certain characters before putting it into the document.

I wrote an open source program that does this for you. URItoXML

things like
&
 
=
<
>
and I think there are a few other as well.

Member Avatar
Sadun89
Junior Poster
177 posts since Jan 2011
Reputation Points: -16 [?]
Q&As Helped to Solve: 6 [?]
Skill Endorsements: 0 [?]
 
0
 

Both are markup languages....
But you asked what are the main different between them..
Main different is XML use for data transfer & html use for data(website details) presentation..

In other way,

XML was designed to transport and store data.
HTML was designed to display data.

Go 2 W3Schools

Member Avatar
seonetsmartz
Newbie Poster
12 posts since Sep 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

The major difference between HTML and XML is that HTML describes presentation and XML describes content of website. HTML document is human readable and XML is for both human and Robot(machine readable).

Member Avatar
jmichae3
Junior Poster
118 posts since Jul 2011
Reputation Points: -1 [?]
Q&As Helped to Solve: 14 [?]
Skill Endorsements: 0 [?]
 
0
 

XML also has some rules regarding content that HTML does not: some characters must be translated into named(

&quot;

) or numeric ampersand-pound-number-semicolon entities (sorry, can't show you , daniweb converts them even in code mode!). I wrote a program to do this translation. https://sourceforge.net/projects/uritoxml
They also have different headers.

XML can be transformed into HTML, XHTML, or any other markup language using XSLT.

Member Avatar
ranawaqar
Newbie Poster
2 posts since Dec 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
0
 

HTML is an SGML used for web page design, help files, and HTA applications.

XML is a more generalized mark-up language typically used for system or application configuration files or data migration projects.

XHTML is a version of HTML that strictly adheres to XML rules.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article