Chapter 13. XML As Presentation

So far, we’ve primarily looked at XML as a low-level enabling technology—end users won’t know if you’re using regular properties files or the XML properties files shown in Chapter 9. And when the XML documents we discussed are meant to be shared between applications, those applications are generally data-centric server applications. The last chapter explored examples in which XML was used in a client-server context: RSS and Atom feeds are delivered directly to clients, in those cases RSS and Atom aggregators. (Of course, there are server-based RSS aggregators like News-Gator ( and My Yahoo! ( But that is a limited case tied to the specific vocabularies of RSS and Atom. In this chapter, we’ll look at more generic cases of using XML as part of the presentation technology in a web application.


I need to make a few assumptions here. First, I’m going to assume you have read the prior chapters. As with the ROME library used in the last chapter, we’re going to be using some of the libraries used prior in this chapter, most significantly, DOM. Second, that you have some familiarity with various web technologies such as HTML, JavaScript, Java servlets, and JavaServer Pages (JSP). Along the same lines, I’m assuming you know how to set up a Java servlet container (such as Apache Tomcat) or can get someone’s help to do so. If you want to learn how to write a Java web application, this chapter won’t help. So, if ...

Get Java and XML, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.