An XSL stylesheet can be used to transform an XML document into another type of document, such as XHTML.
XSLT 1.0 is farily limited, but the working draft of XSLT 2.0 contains more functionality that will make transformations much easier. While waiting for it to be finalised, there are a few distributions that can be added to your templates that may help.