could someone explain XML to me please.

DAM

Diamond Member
Jan 10, 2000
6,102
1
76
well, i just finished reading the July 3rd issue of info world, where it talks about XML and the new standards that are trying to be implemented. and well, honestly i am still a little vague on what it is.

is XML like ASP?
how does it differ if it is like ASP? what are advantages?
what is the relation between XML and HTML?

i have a barrel full of questions for anyone willing to take them on, thanks!



cheers

dam()
 

Locutus of Board

Diamond Member
Dec 14, 1999
7,187
0
0
DAM,

I was wondering the same thing. As a matter of fact, I had a free book coming to me from this book club, and they had a cool looking XML one, so I got it.

I would like to know too while I wait for my book!

THX!
 

XML is nothing like ASP. ASP is a server-side scripting engine for creating dynamic content. ASP is more akin to ColdFusion and Java Server Pages (JSP).

XML is a world of it's own. It is a subset of SGML, which is a universe of it's own.

At the lowest level, XML is used to describe data. A record for a person could be described in XML like this:

<person>
<name>John Smith</name>
<id>123456789</id>
<role>Peon</role>
</person>

Notice it's a lot like HTML. However, XML is waaaaay more strict when it comes to formatting tags than HTML.

XML on it's own does not care about presentation of the data, it just cares about data. The cool part about it is that if you want to format the XML data into HTML you can use a presentation layer such as XSL (eXtensible Stylesheet Language) to do so.

This is just a 10,000 foot explanation. It goes much deeper than this when you start getting into specific applications of XML, such as WAP, SOAP, and a ton of other acronyms. Also there are ways to describe the data you are describing. This is general done via DTD (Document Type Definition) files.

I hope this didn't confuse you more. I was in a mental fog about XML for a couple of months when I first started looking into using it.
 

DAM

Diamond Member
Jan 10, 2000
6,102
1
76
so if XML handles data, then is it server side or client side?

and what is the main softare used for XML, like can coldfusion use XML, like a plugin?



dam()
 

It can be server-side or client side. It's just a way of describing data.

It can be used on the server-side to store/transfer data from one server to another. It can also be used on the client side for presentation. You have to understand that XML is not a product like ASP. It's a pretty ambiguous technology with many purposes. There are many products that use it. Microsoft Office 2000 uses it to store document types. Many programs are starting to use it as a replacement for INI type files. Servers use to to pass data and procedure calls to other servers. Some web sites use it to present data in a web browser.

If you know C you know that:

struct employee
{
char* name;
int id;
char* title;
};

Is a way to store data, the same structure can be presented in XML as:

<employee>
<name>John Smith</name>
<id>123456789</id>
<title>Peon</title>
</employee>

With XML and a proper data definition, this data can be shared with almost any other program that knows how to parse the XML document.