Cascading Style Sheets/Applying CSS to XML

To apply a stylesheet to an XML document, place the modified following example into the prolog of the XML document.

Any XML declaration, such as, must precede the stylesheet processing instruction.

This applies to XHTML too, if it is served with the correct MIME type:.

A complete example, with an XML declaration and a stylesheet processing instruction: