View Full Version : whats different between xml and html?
03-31-2003, 10:37 PM
what is new about xml from html except ending tags?
03-31-2003, 11:10 PM
That question is asked the wrong way - the question you should be asking is what's the difference between sgml and xml.
You see, xml is a meta language, or a descriptor language. It defines the syntax and vocabulary of files written in xml languages. DTD/schema are the vocabulary part of xml, while xml well-formedness is the syntax part. What the xml file does is actually to connect the vocabulary with well-formedness and the data/document it is to describe. Stylesheets are the document-related styling (CSS, FO), as in html, and the data-related transformation (XSLT). Xml is in itself a stricter subset of sgml.
HTML, on the other hand, is a document language - it's a given vocabulary that can be used with either xml or sgml.
In a way, you can say that an html document is an instance of the sgml class, while an xhtml document is an instance of the xml class - if you talk object oriented programming. That parallel doesn't work entirely, though, since the xml and sgml verions of html share their member definitions.
04-05-2003, 09:50 AM
to knock out some basic questions, go over this:
XML + HTML = XHTML
04-05-2003, 09:42 PM
Um, when I make a file with all those ending tag rules xhtml explained and gave it an xml extention, I get a visual map of tags. Then when I look at already made xml files (winamp 3 had one, why and what the heck it does, I don't know), it had weird stuff like phoney made up tags that seemed to serve no purpose. What is xml exactly? I'm trying to fill in the gap of the equation xml + html = xhtml
04-05-2003, 10:03 PM
XML is a set of tools for defining a language, and some grammatics for it such as that all elements have to be closed, which SGML doesn't require. HTML is a set of "keywords" in the form of elements, attributes, entity references and their semantic meaning, The semantic meaning is lost to the technology, however, because you can't validate that you are using a tag for it's intended purpose by the validation system DTDs provide.
In other words, the <>, </>, <!-- -->, <!>, <??>, &#nnnn; are what is provided by XML, and the standard for HOW to make them get a meaning, not what their meaning actually is.
What HTML, SVG, MathML, SOAP, RDF DocBook etc. adds to it, is the actual meaning - they add tags, attributes, entity references and legal attribute values. On that, they can also add default behavior, but this is - like in the case of semantic meaning - nothing that is provided with the language definition, but only provided by human readable specifications.
Tails: If you're using IE, I'm not surprised. IE's XML engine doesn't have any knowledge of the XHTML namespace. That's what I meant by that default behavior can be provided, but isn't programmatically inherent to the language.
04-05-2003, 10:09 PM
Originally posted by Tails
I'm trying to fill in the gap of the equation xml + html = xhtml
from w3schools (http://www.w3schools.com):
XML was designed to describe data and focus on what data is.
HTML was designed to display data and focus on how data looks.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.