gaijinco said:
I have used HTML for a while now and had tried to jump into XML for a
long while but it seems that there is not a tutorial to go from HTML
to XML.
Partly because that isn't actually the correct way of thinking about the
problem.
HTML is one specific application of SGML, the Standardized General
Markup Language. XML is a simplification and evolution of SGML. Both XML
and SGML are abstractions -- shared basic syntax upon which many
specific markup languages can be built.
So the real direct-equivalent transition is really from HTML to some
***specific*** XML-based markup language. The most obvious one would be
XHTML, which is the "next generation" of HTML and which is an XML
language rather than an SGML language. (XHTML is to XML as HTML is to
SGML, more or less.)
Like any HTML user what I will want is to include images and links in
my documents in almost the same way that the IMG and A tag's do.
How that's done depends on which XML language you're working with. Since
XHTML is an evolution of HTML, almost all the things you're used to
doing in HTML will work the same way in XHTML.
Other languages may represent these in completely different ways, or may
not have the concepts at all. It may not make sense to have the concept
of "image" in a language designed for accounting data, for example, and
links might be specified via something based on XPath and thus not
require a predefined "anchor" on the receiving end. Or the links may be
entirely implicit...
Decide which XML language you're working with; that will determine how
things are represented, and will determine what you can do with the
documents -- which may not include viewing them directly in a browser;
many XML documents are not intended to be directly read by humans and it
is assumed that you will put them through a stylesheet or some other
processing to render them into a form suitable for browsing or printing.
The output of that process may be HTML, XHTML, XSL-FO... or something else.
XML is a general framework for data markup. Not all markup is display
markup.