Transforming Attribute Centric XML Data into an HTML Table

As you've seen in earlier examples, after creating an XML file from an ADO recordset, the generated output contains attribute-centric XML. To import this type of output to Access you had to create a special stylesheet and apply the transformation to convert the attribute-centric XML to the element-centric XML that Access supports. But what if you simply want to display the XML file created from an ADO recordset in a web browser? You can create a generic XSL stylesheet that draws a simple HTML table for the users when they open the XML attribute-centric file in their browser.

Hands-On 29-16 demonstrates how to create a stylesheet to transform the attribute-centric XML file created in Hands-On 29-13 into HTML. The hands-on exercise that immediately follows performs the transformation by inserting a reference to the XSL stylesheet into the XML document.

Part V

0 0

Post a comment