![](https://csdnimg.cn/release/download_crawler_static/445536/bg10.jpg)
Java & XML, 2nd Edition
11
In this book, the main example of a high-level API is XML data binding. Data binding allows
for taking an XML document and providing that document as a Java object. Not a tree-based
object, mind you, but a custom Java object. If you had elements named "person" and
"firstName", you would get an object with methods like getPerson( ) and
setFirstName( ). Obviously, this is a simple way to quickly get going with XML; hardly
any in-depth knowledge is required! However, you can't easily change the structure of the
document (like making that "person" element become an "employee" element), so data
binding is suited for only certain applications. You can find out all about data binding in
Chapter 14.
1.2.3 XML-Based Applications
In addition to APIs built specifically for working with a document or its content, there are a
number of applications built on XML. These applications use XML directly or indirectly, but
are focused on a specific business process, like displaying stylized web content or
communicating between applications. These are all examples of XML-based applications that
use XML as a part of their core behavior. Some require extensive XML knowledge, some
require none; but all belong in discussions about Java and XML. I've picked out the most
popular and useful to discuss here.
First, I'll cover web publishing frameworks, which are used to take XML and format them as
HTML, WML (Wireless Markup Language), or as binary formats like Adobe's PDF (Portable
Document Format). These frameworks are typically used to serve clients complex, highly
customized web applications. Next, I'll look at XML-RPC, which provides an XML variant
on remote procedure calls. This is the beginning of a complete suite of tools for application
communication. Building on XML-RPC, I'll describe SOAP, the Simple Object Access
Protocol, and how it expands upon what XML-RPC provides. Then you'll get to see the
emerging players in the web services field by examining UDDI (Universal Discovery,
Description, and Integration) and WSDL (Web Services Descriptor Language) in
a business-to-business chapter. Putting all these tools in your toolbox will make you
formidable not only in XML, but in any enterprise application environment.
And finally, in the last chapter I'll gaze into my crystal ball and point out what appears to be
gathering strength in the coming months and years, and try and give you a heads-up on what
is worth monitoring. This should keep you ahead of the curve, which is where any good
developer should be.
1.3 The Essentials
Now you're ready to learn how to use Java and XML to their best. What do you need? I will
address that subject, give you some basics, and then let you get after it.
1.3.1 An Operating System and Java
I say this almost tongue in cheek; if you expect to get through this book with no OS
(operating system) and no Java installation, you just might be in a bit over your head. Still, it's
worth letting you know what I expect. I wrote the first half of this book and the examples for
those chapters on a Windows 2000 machine, running both JDK 1.2 and JDK 1.3 (as well as
1.3.1). I did most of my compiling under Cygwin (from Cygnus), so I usually operate in
a Unix-esque environment. The last half of the book was written on my (at the time) brand