Click to See Complete Forum and Search --> : What is Xml?


spykemitchell
10-03-2003, 02:26 PM
Would anyone please tell me what xml is exactly and why it is special?

I have never used it but looking over te posts it seems quite usefull...

would anyone like to help?

Charles
10-03-2003, 02:42 PM
There is, by definition, only one answer to the question "What xml is exactly?" And that answer is found at http://www.w3.org/TR/REC-xml.

spykemitchell
10-03-2003, 03:43 PM
thanks i'll read that now!

fyrestrtr
10-06-2003, 04:23 AM
If you are still confused after reading that, let me offer up a simplified version of what XML is, and what it isn't.

XML is simply a language that was created to allow people to define and describe data. It has no tagset (unlike HTML). You create your own tags, to define information however you like.

Since it is so customizable, it is often used to assist in the transfer of information between systems that aren't natively compatible. Since it is plain text (and not in binary form, such as .doc for example), almost all computer systems can read XML files.

HTML (unlike XML) is used to control the display of information. Tags in HTML do not offer any information as to what is contained between them. For example, <td> doesn't tell you if the data is a phone number, someone's name, etc. It is merely there to tell the client (browser) how to display that information.

XML on the other hand, tells you something about the data in between its tags. For example :


<address type="home">
<street>102 Main Street</street>
<city>Anywhere</city>
<state>AW</state>
<country>USA</country>
</address>


A human can read that and understand (or atleast have an expectation) as to what data is included in the file.

Hopefully this will clear things up. :)

jeeza
10-27-2003, 12:20 PM
Originally posted by fyrestrtr
XML is simply a language that was created to allow people to define and describe data. It has no tagset (unlike HTML). You create your own tags, to define information however you like.
...
A human can read that and understand (or atleast have an expectation) as to what data is included in the file.
Hi. I am new here...which is all the more reason to ask questions I guess. :)
Your explanation has made it a lot clearer to me what XML is, but still there is something I don't understand.
Since XML is so very human-readable, that may be interesting for humans ; but exactly of what help is this to the processes needed to get information out on the internet ?
I have put your XML example into a little .xml file and opened it in my browser. It showed up as a complete , although unstructured address, everythng on one single line.
If you read the code however you see the tags : "address", "street", etc. which you don't really need to understand what this is, as you can easily see that it is an addrss, in your browser as well as in your text editor.