XML Formatting Strategies

As terminally uncool as XML may be perceived by some, one aspect of XML that certainly isn't uncool is XML formatting. The reason is because you can dress up XML quite a bit by formatting it properly. There are two fundamentally different approaches to formatting XML documents, both of which you learn about in this tutorial. I'm referring to Cascading Style Sheets (CSS) and eXtensible Style Language (XSL).

CSS is already in use around the Web as a means of formatting HTML web pages above and beyond the limited formatting capabilities of HTML. XSL, on the other hand, is purely designed for use with XML and is ultimately much more powerful and flexible than CSS. Even so, these technologies aren't really in competition with each other. As you learn in this tutorial, they offer unique solutions to different problems, so you will likely find a use for each of them in different scenarios.

In this tutorial, you'll learn

  • The basics of style sheets and XML formatting
  • When and why to use CSS and XSL on the Web
  • The practical differences between CSS and XSL style sheets
  • How to format a basic XML document using CSS and XSLT style sheets
by BrainBellupdated