Discussion:
HTML vs XML
(too old to reply)
Fred
2006-05-19 06:57:47 UTC
Permalink
Just about the time I have started to feel comfortable programming in HTML,
this XML comes along. Would some kind soul pls post the difference between
the two and why one is better than the other.

Thanks!
Jukka K. Korpela
2006-05-19 07:12:40 UTC
Permalink
Post by Fred
Just about the time I have started to feel comfortable programming in HTML,
So why don't you go and establish comp.programming.html? Surely you would
get sufficient support for such a group, which is for some odd reason
nonexistent.
Post by Fred
this XML comes along.
Yeah, what a shock. We were all surprised when SGML appeared in 1980, and a
little less surprised when its oversimplification called XML started being
hyped around 1998.
Post by Fred
Would some kind soul pls post the
difference between the two and why one is better than the other.
Oh, that's simple. HTML - XML = HTML, and HTML is better than XML just like
an apple is better than an orange.
Post by Fred
Thanks!
You're welcome. I hope you enjoyed your 5 minutes of attention.

Followups randomized, as usual for trollingly crossposted "questions".
Toby Inkster
2006-05-19 07:37:57 UTC
Permalink
Post by Fred
Just about the time I have started to feel comfortable programming in HTML,
this XML comes along.
Firstly, creating an HTML document is not "programming" any more than
creating a PDF document or a GIF image. Secondly, XML came along more than
eight years ago.
Post by Fred
Would some kind soul pls post the difference between the two and why one
is better than the other.
Neither is "better" -- it's like comparing apples with oranges.

HTML is a language for marking up documents -- describing their structure.
For example:

<h1>This is a heading.</h1>
<p>This is a paragraph. <em>This is important.</em></p>
<h2>This is a sunheading.</h2>
<img src="this_is_an_image" alt="this is some alternative text">
<!-- and so on -->

XML is not a language for marking up documents -- XML is a framework for
creating *other* markup languages.

For example, using XML, people have created:

* SVG - an image format
* RSS - a format suitable for syndicating news stories
* MathML - a format for describing mathematical symbols and formulae
* SMIL - a format for describing multimedia presentations
* XHTML - a language similar to HTML, but obeying XML rules

So in summary:

* HTML is a language for creating documents
* XML is a technology for creating languages
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Fred
2006-05-22 23:35:44 UTC
Permalink
Thanks, Toby.
Post by Toby Inkster
Post by Fred
Just about the time I have started to feel comfortable programming in HTML,
this XML comes along.
Firstly, creating an HTML document is not "programming" any more than
creating a PDF document or a GIF image. Secondly, XML came along more than
eight years ago.
Post by Fred
Would some kind soul pls post the difference between the two and why one
is better than the other.
Neither is "better" -- it's like comparing apples with oranges.
HTML is a language for marking up documents -- describing their structure.
<h1>This is a heading.</h1>
<p>This is a paragraph. <em>This is important.</em></p>
<h2>This is a sunheading.</h2>
<img src="this_is_an_image" alt="this is some alternative text">
<!-- and so on -->
XML is not a language for marking up documents -- XML is a framework for
creating *other* markup languages.
* SVG - an image format
* RSS - a format suitable for syndicating news stories
* MathML - a format for describing mathematical symbols and formulae
* SMIL - a format for describing multimedia presentations
* XHTML - a language similar to HTML, but obeying XML rules
* HTML is a language for creating documents
* XML is a technology for creating languages
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
David Segall
2006-05-19 15:15:31 UTC
Permalink
Post by Fred
Just about the time I have started to feel comfortable programming in HTML,
this XML comes along. Would some kind soul pls post the difference between
the two and why one is better than the other.
Thanks!
I think you meant to ask for a comparison of HTML and XHTML. If so,
the main difference now is that XHTML tags have been changed slightly
so that they conform more closely to the format required for an XML
based language.

I chose to write my web site using XHTML because W3C told me it was
the modern thing to do <http://www.w3.org/MarkUp/>. Since then I have
discovered that my decision was controversial
<http://www.hixie.ch/advocacy/xhtml>. I don't regret my decision but
you can justify staying with HTML by using Ian Hickson's arguments.
David
2006-05-19 15:37:50 UTC
Permalink
David Segall wrote:
<snip>
Post by David Segall
I chose to write my web site using XHTML because W3C told me it was
the modern thing to do <http://www.w3.org/MarkUp/>.
If the above statement is true, than you did not choose, you were told ! :)

Since then I have
Post by David Segall
discovered that my decision was controversial
<http://www.hixie.ch/advocacy/xhtml>. I don't regret my decision but
you can justify staying with HTML by using Ian Hickson's arguments.
Fred
2006-05-22 23:35:45 UTC
Permalink
Thanks, David. Yes, XHTML is what I meant. I'll just stick to HTML then.
Post by David Segall
Post by Fred
Just about the time I have started to feel comfortable programming in HTML,
this XML comes along. Would some kind soul pls post the difference between
the two and why one is better than the other.
Thanks!
I think you meant to ask for a comparison of HTML and XHTML. If so,
the main difference now is that XHTML tags have been changed slightly
so that they conform more closely to the format required for an XML
based language.
I chose to write my web site using XHTML because W3C told me it was
the modern thing to do <http://www.w3.org/MarkUp/>. Since then I have
discovered that my decision was controversial
<http://www.hixie.ch/advocacy/xhtml>. I don't regret my decision but
you can justify staying with HTML by using Ian Hickson's arguments.
Loading...