Join Joe Marini for an in-depth discussion in this video What is XML?, part of XML Essential Training.
- View Offline
Okay, let's begin by addressing two of the most common questions about XML. What is XML and what is it used for? Okay, so what is XML? XML is the eXtensible Markup Language. It gets its name from the X, M, and L in eXtensible Markup Language. XML became a W3C recommendation, or standard, way back in 1998. The W3C, of course, is the World Wide Web Consortium, which is one of the standards bodies that proposes and standardizes various ways of working with web technologies.
So it's been around for a while, and it's in pretty wide use. It's a tag-based syntax, very much like HTML. So if you're all ready familiar with working with HTML, then XML is going to look very familiar to you. It uses the same kind of tag syntax, and same kind of attributes, and so on. Now you don't have to know HTML in order to use this course and learn about XML, but if you already know HTML, you're going to feel very much at home. Now having said that, I want to point out that XML is not a replacement for HTML.
HTML is a tag set that solves a very specific problem, which is marking up web pages. XML is much more general purpose. And we'll talk about that in a little bit. Now remember, X means eXtensible. One of the great things about XML is that you can make up your own tags. So if you have a particular problem where you need to markup some information, and there isn't already an existing tag set in XML for you to use, then you can make up your own. And again, we'll see examples of this as we go through the course.
But just remember, X means eXtensible. It's a way of defining tags to mark up data and solve particular information related problems. XML is also the foundation of several web technologies that you may have heard of, for example, XHTML. XHTML is HTML formatted as XML syntax. Now, that may sound kind of strange, but XML has very particular rules about how things are formatted. And HTML, even though it's also tag-based, is sometimes a little bit loose and, you know, free with letting you get away with things that XML won't let you get away with.
Now, there are different ways of exchanging data over the web using web services, but XML is one of them. So, if you work with web services, chances are, sooner or later, you will run into using XML and interacting with them. Okay, what is XML used for? XML is used to structure and describe information. And if you get very little else out of this course, remember this sentence right here. XML's purpose is to take information, and apply structure and meaning to it. And we'll see examples of that as we go through the course.
Now from day one, XML was intended to be used over the internet. The developers that sat down and wrote the XML spec knew that XML will be used as an internet standard, and it was designed with that from the very beginning. XML can be used to exchange data between disparate systems that may have never been intended to talk to each other. For example, a bank might be using a very old computer system, and they might want to create a new application that lets that data be accessed by newer systems.
Again, that may have never been designed to talk to the older system. XML can be used to bridge those kinds of gaps. Okay, so now that we have an understanding of what XML is and what it's used for, let's move on and take a look at some XML-related technologies.
- What is XML?
- The advantages and drawbacks of XML
- Proper XML syntax
- Working with namespaces
- Styling XML tags with CSS
- Extracting and manipulating data
- Taking XPath and XSLT for a spin
- Creating document type definitions and schema definitions