11.3. Using XML

Actual use of an XML document requires that the document be transformed into a usable format. There are many means and formats to translate XML—the limits are governed only by your imagination and tools at hand.

Viewing XML documents doesn't require special tools. Many of the modern user agents can view XML documents and even add capabilities such as tag highlighting and the ability to collapse portions of the document, as shown in Figure 11-1, where Internet Explorer is displaying an RSS document.

Figure 11-1. Figure 11-1

11.3.1. Extensible Stylesheet Language Transformations (XSLT)

The Extensible Stylesheet Language transforms XML documents into formatted documents and can also rearrange document contents to generate new document elements. XSLT takes two items as its input, the XML document (sometimes referred to as the source tree) and a style sheet to determine the transformation. The output document (sometimes referred to as the result tree) is in the desired format ready for output to the desired device.

There are many tools that can help you manage XML documents and perform XSLT, including many open source solutions (search for "XSLT" on sourceforge.org).

11.3.2. XML Editing

You have many choices for editing XML files. Because XML is a text-only format, you can use any text editor (emac, vi, notepad, and so on) to create and edit XML documents. However, ...

Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.