Topic:
Java and XML

Java and XML now includes the Java API for XML (JAX). JAX includes JAXB, JAXM, JAXP and other API. Java and XML also includes DOM/JDOM, XSL/XSLT and Schemas.

O'Reilly Network articles about this topic:

Making the Most of JDBC with WebRowSet
(ONJava.com)
Database to XML and back again. If everyone's doing some or all of this, then shouldn't we write it once, get it right, and standardize? JDBC 3.0's WebRowSet offers a profound increase in power over the old ResultSet. Sharad Acharya shows you what's possible.

Storing an XML Document in Apache Xindice
(ONJava.com)
Apache Xindice is a database that's built specifically for storing XML data, meaning you can forget about attempting to map your XML-to-database tables and just store it as is, exploiting the structure nature of the XML data to pick up some query-time conveniences. Deepak Vohra introduces this database and shows how to make it work.

Exploring Laszlo Classes, Attributes, and Events
(ONJava.com)
Laszlo offers an interesting option for rich client-side GUIs--XML markup of widgets and their event handling, which is then converted into a Flash executable that is run with the Flash plugin in the user's browser. Satya Komatineni introduces Laszlo and shows how to get started writing web applications with it.

Parsing an XML Document with XPath
(ONJava.com)
Pulling just a single node value or attribute from an XML document can be inefficient if you have to parse over a whole list of nodes you don't want, just to get to one you do. XPath can be much more efficient, by letting you specify the path to the desired node up front. J2SE adds XPath support, and the JDOM API also offers support through an XPath class. Deepak Vohra looks at both approaches.

XML Messaging Using JBoss
(ONJava.com)
Simple communication in an enterprise system is possible through various schemes, but not all of them answer the question of coordination. Benoit Aumars presents a hypothetical case study that shows how generating and sharing information in XML is made easier with Java Messaging Service (JMS) and Java Management Extensions (JMX).

XML Document Validation with an XML Schema
(ONJava.com)
In many cases, it's useful not just to get the values from an XML document, but to verify that the document itself is properly formatted. Deepak Vohra takes a look at how to validate XML documents with Xerces2-j and JAXP.

Writing Ant Tasks
(ONJava.com)
Among the many reasons the Java community loves Ant is its flexibility: adding new capabilities to Ant just requires writing a small amount of custom Java code. Michael Fitzgerald shows how Ant can be extended to provide handy XML validation.

Documenting Projects with Apache Forrest
(ONJava.com)
Apache Forrest helps you develop the documentation to accompany your application, automatically providing a number of neat features such as menus, links, cross-references, and breadcrumb navigation. Kyle Downey provides an introduction.

Understanding JAXB: Java Binding Customization
(ONJava.com)
JAXB, Java Architecture for XML Binding, is a specification (or standard) that automates the mapping between XML documents and Java objects and vice versa. One of the primary components of JAXB is the schema compiler. The schema compiler is the tool used to generate Java bindings from an XML schema document. If used in its default mode (for non-trivial applications), the compiler usually generates bindings that are awkward to work with. This article will look at various methods you can use to customize the generated bindings.

Developing with Maven
(ONJava.com)
By knowing what developers want in a build tool, Maven hopes to unseat Ant as the favorite build tool of Java developers. Rob Herbst looks at Maven's most compelling features.

XML Parsing in a Producer-Consumer Model
(ONJava.com)
Decent APIs such as SAX have made XML parsing much easier than in the old DOM and pre-DOM days. That doesn't mean it's completely natural, though, in all circumstances. Throw XML parsing into a multithreaded application and things can get weird quickly. That's where a different approach can help. Prabu Arumugam demonstrates the producer-consumer model, which can allow multithreaded XML processing.

SearchAssist: A Portable Search Engine in Java
(ONJava.com)
While server-side Java solves many problems, it's not always available. Besides, there's more to a good UI than HTML can provide. Sometimes an applet can fit the bill. Ashwin Jayaprakash demonstrates a search engine applet designed for portability and power.

Putting XML in LDAP with LDAPHttp
(ONJava.com)
XML is great for transferring information, but it really falls down as a searchable store. Mapping XML into a relational database is, well, tricky. Jon Roberts demonstrates that a directory database (LDAP, for example) makes a nice compromise while building a weblog commentary system.

Creating Email Templates with XML
(ONJava.com)
Nearly every web app needs to send email at some point, but storing message bodies and headers can be tricky. Rafe Colburn demonstrates using XML, the Commons Digester, JavaMail, and MessageFormat to simplify generating and sending email.

XML Publishing with Cocoon 2, Part 1
(ONJava.com)
Apache Cocoon is an XML-publishing framework that allows you to build powerful applications from customized components. Yeah, that's a mouthful. Collin VanDyck and David Cummings demonstrate Cocoon's sitemap and XML generation capabilities.

Developing E-Business Interactions with JAXM
(ONJava.com)
RPC-style web services are getting a lot of press, but sometimes transferring a document is more important than calling a remote procedure. Nikhil Patil explores JAXM, the Java API for XML Messaging, which allows document-style web services.

Using Hierarchical Data Sets with Aspire and Tomcat
(ONJava.com)
While much of the database world is relational, a great deal of data is hierarchical--think web pages, XML, and Java classes. Aspire lets you retrieve and manipulate hierarchical data sets. Satya Komatineni explains why you might want to do this.

Learning and Using Jakarta Digester
(ONJava.com)
Turning an XML doc into Java bean objects is a common task, but the SAX and DOM APIs are too low-level. Jakarta Digester uses a series of rules to simplify this important task.

XML to PDF? Oh, FOP It.
(ONJava.com)
FOP is an open source Java API for converting XML data to PDF and other formats. This article shows you how it's done.

Simple XML Parsing with SAX and DOM
(ONJava.com)
While there are two APIs for handling XML, SAX and DOM, they are large and formidable to beginners. This article offers a tutorial for simple XML parsing.

Why Data Binding Matters
(ONJava.com)
Brett McLaughlin offers five examples of how data binding can save you considerable time and energy.

BEA Implements New Web Services Standard
(ONJava.com)
BEA's Weblogic Workshop is the first implementation of Java Web Services tags -- a new file format standard aimed at making development of Web services much easier.

Hangin with the JAX Pack, Part 4: JAX-RPC
(ONJava.com)
In the final installment of this series, Al Saganich looks at JAX-RPC, the Java API for XML-based RPC. Guess what -- it's really just another instance of RMI.

Java API Map
(ONJava.com)
Is the world of Java getting a little unweildy for you? Use our Java API map and directory to track all significant Java platforms and respective Java APIs. Includes the JAX Pack and MIDlets.

Developing with JAXB and Ant, Part 1
(ONJava.com)
Apache's Jakarta Ant is a powerful build tool for automating tasks in Java development, working with the JAXB API. In the process, you'll see how JAXB works with packages.

Understanding UDDI and JAXR
(ONJava.com)
This article takes you into the spec for UDDI, the Universal Description, Discovery and Integration, with an explanation of tModels, binding templates, and identity and category bags. JAXR is also briefly covered.

Writing JSPs in XML using JSP 1.2
(ONJava.com)
Stephanie Fesler covers using XML syntax within a JSP -- part of the new JSP 1.2 specification. Learn why you would want to do this and what the differences in syntax are.

XML Data Binding with Castor
(ONJava.com)
XML can make even simple things difficult. Wouldn't it be nice to be able to work with Java instead? The Castor XML data-binding framework provides a path between XML and Java objects and back again.

Getting Up To Speed with JXTA
(ONJava.com)
Get up to speed on JXTA in time for O'Reilly's P2P and Web Services Conference. This package includes an analysis of the JXTA framework, a
JXTA Shell tutorial, and a look at JuxtaNet, an alternative to Gnutella.

XSLT Processing with Java
(ONJava.com)
This chapter from Java and XSLT is devoted to Java and XSLT programming techniques that work for both standalone applications as well as servlets, with a particular emphasis on Sun's Java API for XML Processing (JAXP) API.

Java and XML: SOAP
(ONJava.com)
In this excerpt from Chapter 12 of Java & XML, 2nd Edition, Brett explains what SOAP is, and why it is such an important part of where the web development paradigm is moving. That will help you get the fundamentals down, and prepare you for actually working with a SOAP toolkit.

Java and Web Services Primer
(ONJava.com)
BEA Systems' Al Saganich begins this series on Java and XML Web Services by
introducing and demonstrating Web services as an extension of Remote Procedure Calls (RPC). Future articles in this series will show you how the Java 2EE and Web Services work together.

Using PASX
(ONJava.com)
PASX is an open source component configuration and naming framework tool and solution for XML and JNDI application and Web services development.

Java and XML Week
(ONJava.com)
This week, we focus on Java and XML as essential for business-to-business information interchange, synchronous data messaging, and business service objects, as well as content generation in the context of Java application and Web services development.

XML Messaging with Jabber
(openp2p.com)
Because of its XML roots, Jabber has virtually an unlimited messaging capacity. You can even receive news headlines via RSS alongside AIM, IRC, ICQ, and Jabber messages.

Other documents about this topic:

Below are other references available on the web for this topic. Since other sites may change their links, please
if you find any that may need to be updated.

Java and XML Q&A
This Q&A session with David Brownell discusses the affinity between Java and XML. He says that Java provides
portable code and XML provides portable data; together, you have portable objects. He describes Sun's work
on Project X, the code name for new work to integrate XML processing into applications.
[Source: Javasoft]

Simon Phipps: IBM's Chief Java and XML Evangelist
O'Reilly Net recently caught up with Simon Phipps, IBM's Chief Java and XML Evangelist while he
was in San Francisco for the XML Day at Seybold Seminars. In his keynote at Seybold,
titled "Escaping Entropy Death: The Imperative of XML and Java," he sees the problem
with integrating computer systems is that platform-centric dependencies are creating
greater and greater complexity. The role of Java is to provide a platform-neutral way to
write programs and for XML a software-neutral to encode data.

Oracle JDeveloper
Oracle JDeveloper is a Java application development environment for building Java and XML applications,
especially for e-business applications on the internet. Features include generation of XML documents and XSL
Stylesheets, color-coded syntax editing of XML/XSLT/XSD files, transforming XML into HTML or WML,
XML syntax checking, editing/compiling/(remote)debugging of XML and Java, and generation of XML on the fly
using the Oracle Business Components for Java framework or the database directly.

Why XML is Meant for Java
A close relationship between XML and Java has existed since the early days
of the XML effort. One of the first public statements about this relationship
came from Sun Microsystems' Jon Bosak, chair of the XML Working Group.
He said, "XML gives Java something to do." But it works the other way as
well: Java lets XML do something useful.
XML by itself is just a lot of text; you need a program to manipulate that text
and make things happen. Up until now, Java has been the language of choice
for writing those programs. But has this just been a marriage of convenience?
Will Java soon be supplanted by other languages, such as Perl and Python,
traditionally used for text manipulation? Or will Java remain the language of
choice, even as the other two compete for attention?
[Source: Web Techniques]

What's Wrong with Perl and XML
The idea for this column came from a talk Nathan Torkington gave at YAPC, in
which he described areas where Perl was weak, one of which is XML.
Although there are many excellent Perl modules dealing with many aspects of XML
(among which a good dozen offer various ways of transforming XML documents),
the languages that seem to be favored by XML developers are Java, C/C++, and
maybe even Python. For example, questions on the XML-DEV list mostly involve
Java, C++, and XSLT. Sun, IBM, and Microsoft all push Java or C++
implementations.
[Source: xml.com]

Oracle XML SQL Utility (XSU)
The Oracle XML SQL Utility (XSU) allows the user to generate an XML document given a SQL query or a
JDBC ResultSet object. It also allows the user to Extract data from an XML document, insert data into a
database table, update a database table, or delete corresponding data from a database table.
New features in the current release include: Simple Application Programming Interface for XML version 2
(SAX2) output from any SQL query for handling XML query output of arbitrary size in custom programs or SAX
filters, full support for any JDBC driver removing previous restrictions, initial XML Schema support, (allowing the
user to produce inline XML Schema for the XML result of any SQL query), and new support for retrieving data
as XML attributes instead of elements by using standard SQL column aliasing.
This page also includes links to online documentation and technical data sheets.
[Source: Oracle]

JSX: Java Serialization to XML
Java Serialization to XML (JSX) aims to to provide a simple and lightweight mechanism for compact serialization
of object data that uses only a single method invocation to take in an object and write out its contents as XML
(and vice versa). Java objects are serialized as XML elements, and object fields as attributes. Because of its
specific purpose, JSX does not require the sophistication of SAX or DOM. It is simpler to use, and its memory
footprint is sufficiently small for use in applets.
[Source: CSSE]

JrdfDB
JrdfDB is an open source Java interface for rdfDB that allows querying the database using its query language and
getting the results back as a row/column dataset in plain Java or as a result tree fragment of an XSLT eXtensible
Style Language Transformation.
(rdfDB is an open source database for Resource Description Framework (RDF) developed by R.V. Guha. XT is
a Java-based XSLT implementation that uses the XP parser; http://www.xml.com/pub/r/XT.
[Source: 4XT]

Microsoft .NET vs. J2EE:
Even if you don't write code dedicated to Microsoft platforms, you have
probably heard by now about Microsoft .NET, Microsoft's latest volley in
their campaign against all things non-Windows. If you've read the media spin
from Microsoft, or browsed through the scant technical material available on
the MSDN site, or even if you attended the Microsoft Professional
Developers' Conference (where the .NET platform was officially "launched"),
you're probably still left with at least two big questions:
What exactly is the .NET platform?
How does the .NET architecture measure up against J2EE?
And, if you think more long-term, you might have a third question rattling
around your head:
What can we learn from the .NET architecture about pushing the
envelope of enterprise software development?
The .NET framework is at a very early stage in its lifecycle, and deep details
are still being eked out by the Microsoft .NET team. But we can,
nevertheless, get fairly decent answers to these questions from the
information that's already out there.
[Source: O'Reilly]

O'Reilly's Top 10 JSP Tips by Hans Bergsten
JavaServer Pages (JSP) is an integral API for Java-based Web
application development. A JSP page contains regular markup code
plus special JSP elements. When the page is requested, the static
markup code and the dynamic content produced by the JSP elements
are combined to form the complete response to the request.
It's impossible to tell you everything you need to know to use JSP effectively in a short
article like this (that's why I wrote JavaServer Pages). Instead, this article focuses on
the frequently asked questions that I've heard from people who have just started to
play around with JSP.
[Source: O'Reilly]

Oracle's XML Parser for Java v2
This is the version 2 release of Oracle's Java-based validating XML parser which has XSL support. As of
October 7, Extension functions support was added which allows users of the XSL processor to call any Java
method from XSL expressions.
[Source: Technet]

Java will displace WAP, says Gartner
According to Nick Jones at Gartner Research, WAP will be replaced by Java technology as higher speed mobile services become available.
[Source: Gartner]

JAX
The Java API for XML Messaging (JAXM), Java API for XML Parsing (JAXP), and Java API for XML Data Binding (JAXB) form the core of XML support in the Java 2EE. These API will likely be open sourced through Apache's Jakarta project. These along with the recently announced JXTA networking application API make up JAX (Java, Apache and XML). Others could soon be announced and available.
[Source: Sun]

WSDL 1.1 Draft
WSDL 1.1 is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information. The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint. Related concrete endpoints are combined into abstract endpoints (services). WSDL is extensible to allow description of endpoints and their messages regardless of what message formats or network protocols are used to communicate, however, the only bindings described in this document describe how to use WSDL in conjunction with SOAP 1.1, HTTP GET/POST, and MIME.
[Source: W3C]

ebXML
ebXML is a set of specifications that together enable a modular
electronic business framework. The vision of ebXML is to enable a
global electronic marketplace where enterprises of any size and in any
geographical location can meet and conduct business with each other
through the exchange of XML based messages. ebXML is a joint
initiative of the United Nations (UN/CEFACT) and OASIS, developed
with global participation for global usage.
[Source: ebXML.org]

SOAP and EJB Server Integration
This is a four part series on how to use SOAP with Visual Age and WebSphere. All lot of this articles just show how to
install and configure the SOAP engine with VAJ/WAS. Part 2 will be useful to anybody using SOAP regardless of which server
you're using as it shows how to write the server adapter code for binding SOAP to session beans. Part 3 gets SSL working and
Part 4 will get certificate based authentication working.
[Source: theserverside.com]

Jato API
The Jato API converts XML documents into Java objects and back again. In January, Andy Krumel publicly released
the API in beta form at SourceForge. Based on the observation that transformations are mechanical and tedious, with
Jato a simple XML script describes the XML/Java mapping. In this article, the first of three, Andy explains how to use
Jato to perform basic Java-to-XML and XML-to-Java transformations. In Part 2, he will focus on performing complex
Java-to-XML transformations. Part 3 will explore converting an XML document into Java application objects.
[Source: JavaWorld]

W3C Web Services Workshop
The purpose of the Web services workshop is to gather the community interested in XML-based Web service solutions
and standardization of components thereof, which includes both solution providers and users of this technology. The goal of the workshop is to advise the
W3C about which further actions (Activity Proposals, Working Groups, etc.) should be taken with regard to Web services.
[Source: W3C]

Java and XSLT Tutorial
This Java and XSLT tutorial session was presented at the 2001 O'Reilly Enterprise Java Conference by Borgeson.
[Source: O'Reilly]

JAX Tutorial
This is a JAX or Java and XML API tutorial session as presented at the 2001 O'Reilly Enterprise Java Conference this year.
[Source: O'Reilly]

JAXP Tutorial
This is a JAXP tutorial session as presented at the 2001 O'Reilly Enterprise Java Conference.
[Source: O'Reilly]

ebXML Tutorial
This is an ebXML tutorial as presented at the 2001 O'Reilly Enterprise Java Conference.
[Source: O'Reilly]

Jena API for RDF
This article describes Jena, a Java API for processing Resource Description Framework (RDF). Jena is also the name of the open source implementation of this API. You can find it on XML.com.
[Source: XML.com]

XML Digital Signatures from Java
IAIK have released the first beta of their IAIK XML Signature Library, a Java toolkit to create and verify XML digital signatures.
The toolkit creates signatures as specified by the W3C Candidate Recommendation on XML Signature Syntax and Processing.
The software is available for free, as an evaluation version, downloadable from IAIK's web site.
[Source: XMLHack]

Web Development with JSP
Web applications developed using JavaServer Pages (JSP) may require some interaction with J2EE services. For example, a web-based inventory control system may need to access J2EE's directory services to gain access to a database. Or you may want to use Enterprise JavaBeans (EJB) in your application.
This article presents a brief overview of J2EE, then it shows how to:
Describe J2EE services in a Web Deployment Descriptor (web.xml)
Reference J2EE services
Access and use J2EE services from JSPs
[Source: java.sun.com]