Java Reference
In-Depth Information
<STREET>123 Pine</STREET>
<CITY>New York</CITY>
<STATE>NY</STATE>
<ZIP>10006</ZIP>
<PHONE>201-555-1212</PHONE>
</CUSTOMER>
<CUSTOMER CUSTOMER_NUMBER="102">
<FIRST_NAME>James</FIRST_NAME>
<MI>J</MI>
<LAST_NAME>Corleone</LAST_NAME>
<STREET>123 Pine</STREET>
<CITY>New York</CITY>
<STATE>NY</STATE>
<ZIP>10006</ZIP>
<PHONE>201-555-1214</PHONE>
</CUSTOMER>
</RESULTSET>
The advantage of returning the entire XMLResultSet as an XML document is that many applications
are designed to work with XML. In this form, the XMLResultSet can be transferred between
applications or manipulated using an XSL transform.
Since the target database is defined by a URL, you are not restricted to using local XML files as
databases. Try substituting the URL http://www.moreover.com/cgi-
local/page?o=xml&query=top+stories .
Cross-
Reference
Chapter 17 discusses working with XML sources over the Internet.The
examples are based on accessing the http://www.moreover.com/ Web
site.
Summary
In this chapter, you learn to create a JDBC driver and a simple SQL engine. The examples can be
expanded and modified to form the basis of any custom application requiring a JDBC API. The main
topics covered included the following:
 
Detailed operation of a JDBC driver
 
A simple, String-oriented SQL query engine
 
Examples of working with XML documents
This chapter ends Part IV . Part V explores persistence in the context of Enterprise Java Beans and JDO.
Search WWH ::




Custom Search