PDA

View Full Version : XML or XHTML?


mctnesh81
18.08.2002, 15:54
Hie everyone,
Im relatively new here. Just a question. Im quite confused. Is XML & XHTML the same? If no, how are they different? Plz provide some links where i can find tutorials on these topic.

Bahman
18.08.2002, 16:47
XHTML is the step between HTML and XML. You can learn about all 3 at http://www.w3schools.com/ .

good luck

mad hatter
18.08.2002, 18:57
XML is a very broad language. XML is used to create your own custom language based on the specifications of XML. Since XML is tag-based, HTML is close to an XML language. (HTML is actually based on SGML which might be the original basis for XML, but don't quote me on that.) In an effort to make HTML something compatible with XML stuff, there is now XHTML. It is almost the same as regular HTML, except for a few things (w3schools should show you what's different).

More on XML - it is very user-defined as a language. XML is more a set of rules used to create languages. Say I wanted to make my bookmarks into an XML file. I could setup an XML language called XBookmarks (I used X because it is so trendy!). It may look something like this:

<pre id=code><font face=courier size=2 id=code><bookmarks>
<description>These are my bookmarks!</description>
<uri>http://mysite.com/xbookmarks/</uri>
<folder>
<title>Companies</title>
<bm xlink:href="http://microsoft.com/">Microsoft</bm>
<bm xlink:href="http://ibm.com/">IBM</bm>
<bm xlink:href="http://apple.com/">Apple Computers</bm>
</folder>
<bm xlink:href="http://www.stilleye.com/">World's coolest website</bm>
</bookmarks></font id=code></pre id=code>

I just created an XML language with my own custom tags. You setup the rules for the tags and how they can be used with DTDs or XML Schemas (see http://www.w3.org/ or the w3schools).

As you can see, XML can be whatever you need it to be.

I hope that helps a little.

- D.S.
< [url="http://www.stilleye.com"]stilleye[/url:p4tmez3d02] | [url="http://www.stilleye.com/scripts/marginfix"]IE Margin Fix[/url:p4tmez3d02] >

mctnesh81
20.08.2002, 03:06
Thanks Mad & Bahman. That was useful