Join Joe Marini for an in-depth discussion in this video Understanding XML usage today, part of Real-World XML.
XML is used in a number of different real-world settings today, but you can break down how XML is used into three main categories. Let's cover those now. In the data extraction usage, you are taking XML and using it to represent some type of data format. Now most modern databases can provide data in XML format today. All the large ones, like Oracle and Microsoft and MySQL, IBM for example. They can all export data using XML. The modern browsers can also load XML from different data sources. You can provide a URL or from the local file system. We'll be seeing an example of that later in this course.
There are also technologies like XPath and XQuery that are used for querying XML data in XML documents. XPath is a very lightweight form of querying and it takes a syntax that looks a little bit like Directory Paths that you might be familiar with. XQuery is a bit more complex. XQuery is to XML what SQL is to structured relational data. We are not going to cover that in this course because it's fairly advanced and could easily fill a title all on its own. In the data preparation and processing area of usage, you take the XML data you have been given and prepare it for presentation and process it further.
So for example, if you have an XML file that represents a series of products or items and these items might have prices, you might do some data preparation or processing to run through all the tags and add up all the prices to arrive at a total for example, or count the number of items in a file for some reason. Technologies for doing this are XML Schema, which ensures that XML data in a document conforms to certain rules. So for example, a certain tag of a certain type has to be inside another tag of a certain type, or a tag that indicates a price has to contain only numbers and a period for the decimal place and so on.
The XSLT technology, which stands for XML Stylesheet Language Transformations, is used to transform XML into other syntaxes like ASCII or PDF or HTML or more XML. DOM and SAX are two different programming methods used for scripting XML. In this course, we'll use mostly the DOM because the browsers don't use SAX. For data presentation, you can use a combination of CSS, XSLT or DOM scripting in order to present data to the user. These are not mutually exclusive. You can use a combination of any of these three. During this course we'll do this a few times.
Okay, let's take a look at the XML landscape as it's currently today. In the data storage and exchange side, we have some established standards, like XHTML and RSS and SVG. We'll cover RSS a little bit later in this course. RSS is essentially a way of syndicating content that changes over time. You're probably familiar RSS by reading blogs, for example. SVG stands for Scalable Vector Graphics. That's an XML syntax that describes drawings made using vectors, such as Illustrator files. There are a number of emerging standards however. ATOM, for example, is a standard publishing syndicated content just like RSS is. Only it's slightly richer.
Then there are standards like RDF and XForms, which we won't get into in this course, but solve their own types of business problems. XForms, for example, is a way of processing forms on the web. RDF stands Resource Description Framework. Then there's XHTML 5, which is an emerging standard that aims to standardize the way that web applications are built. On the data processing side, there's DTD and Schema, which we have talked about earlier which enforces rules. There's DOM and SAX, which we also mentioned. Then there's technologies like XMLHTTP Request, which is the foundation of AJAX, and XSLT and XPath, which we have covered earlier.
We also talked a little bit about XML Query for querying XML data and then there's the XLink and XPointer specifications, which are also emerging. Again, we won't cover those in this course because they are fairly advanced, but the idea is that these provide more advanced ways of linking XML documents together far beyond what the standard HTML link gives us today. Okay, so with this in mind, let's take a look at some important XML technologies.
XML Essential Training is a prerequisite for getting the most out of this course.
- Understanding the Sitemap index format
- Integrating XML and design
- Using XML effectively in Firefox and Internet Explorer
- Avoiding common design mistakes
- Understanding and implementing DOM algorithms
- Building an XML tag set
- Using XML with RSS and Atom
- Processing XML data with XSLT