Workshop
The Workshop is designed to help you review what you have learned and to help you further increase your understanding of the material covered in this hour.
Quiz
1: | What are the two tag forms an XML element may take? | 2: | How do you tell the browser you are sending it XML? | 3: | How can you convert XML into HTML? |
Answers | | A1:
| An XML element may be represented as an opening/closing tag pair like <page></page> or by a single tag like <page/>. | | | A2:
| Use the response.setContentType method and set the content type to text/xml. | | | A3:
| Create an XSLT stylesheet to convert the various elements in the XML document into the desired HTML equivalents. |
Activities
Create a simple XSLT stylesheet that converts XML into a simple HTML document. Use a JSTL transform action to display the HTML. Amazon has a Web Services Program available at http://www.amazon.com/webservices. Through this program, you can search Amazon and receive an XML response. Create a JSP that displays the results of an Amazon XML search using the JSTL XML tags.
|