Earlier XML, developers had to produce dynamic Web pages with some sort of server-side scripting technology, such as CGI, Java servlets, or JSP. In the pre-XML model, a built-in API makes the user-request parameters available; the server-side script then generates dynamic content and sends it back to the browser. That's still probably the best programming model for applications that need real-time access to data stored in a database. In this new model, you create XML documents from the data stored in your databases at some regular interval. Then you serve the XML documents directly to clients. For Web browser clients, you transform XML to XHTML via XSLT style sheets. It gets really interesting when you have to use only one style sheet to create different XHTML pages based on the user input. I'll show you how to implement this technique. This article discusses two ways to produce dynamic Web pages with Java and XSLT by passing user-request parameters from a Java backend program to an XS...
This article demonstrates how to automate e-mail publishing chores with Java and XML. This concrete application of XML and XSLT describes an e-mail newsletter (e-zine) publishing application that outputs both HTML and plain text e-mail messages. Five reusable code samples include a Java program to send e-mails using JavaMail, an XSLT style sheet to convert the DocBook sample introduced in Part 1 to HTML, a Java configuration handler (in the form of a SAX ContentHandler), and the Java code that puts it all together in a multistepped transformation.... Tags:
XML and JSP are two of the hottest buzzwords these days. This article shows how you can use these two technologies together to make a dynamic Website. You also get a look at code examples for DOM, XPath, XSL, and other Java-XML techniques....
XML data binding for Java is a powerful alternative to XML document models for applications concerned mainly with the data content of documents. This article by an enterprise Java expert introduces data binding and discusses what makes it so appealing. He then shows readers how to handle increasingly complex documents using the open source Castor framework for Java data binding. If your application cares more about XML as data than as documents, you`ll want to find out about this easy and efficient way of handling XML in Java....
Based on an analysis of several large XML projects, this article examines how to make effective and efficient use of DOM in Java. The DOM offers a flexible and powerful means for creating, processing, and manipulating XML documents, but it can be awkward to use and can lead to brittle and buggy code. Author Parand Tony Daruger provides a set of Java usage patterns and a library of functions to make DOM robust and easy to use.... Tags:
This article describes the design and implementation of an intuitive, fast and compact (40K) Java toolkit for parsing and manipulating XML -- Electric XML -- the XML engine of the author`s company. It shows one way to apply object-oriented techniques to the creation of an XML parser, and it provides useful insight into API design. The source code for the non-validating parser described in this article may be downloaded and used freely for most commercial uses....