Home | Business News | Browse by Publication | X | XML Journal

JAX Pack! Bridging the gap between Java and XML technologies.

Publication: XML Journal
Publication Date: 01-JAN-02
Format: Online
Delivery: Immediate Online Access

Article Excerpt
JAVA AND XML ARE PERFECTLY MARRIED. JAVA REPRESENTS A TECHNOLOGY EVOLUTION FOR PLATFORM-INDEPENDENT DEVELOPMENT AND DEPLOYMENT, AND AN EFFECTIVE MECHANISM FOR ACHIEVING DISTRIBUTED COMPUTING. XML, A VERY SIMPLE CONCEPT. HAS TAKEN THE INDUSTRY BY STORM AND IS REVOLUTIONIZING HOW DATA IS REPRESENTED AND EXCHANGED WITHIN A COMPANY AND BETWEEN ENTERPRISES. IN A NUTSHELL. JAVA REPRESENTS PORTABLE CODE AND XML REPRESENTS PORTABLE DATA -- A PERFECT MARRIAGE.

IN AN EFFORT TO FUEL THIS MARRIAGE, SUN HAS LAUNCHED A SET OF TECHNOLOGIES COLLECTIVELY KNOWN AS THE JAX PACK. JAX PACK -- ESSENTIALLY A BUNDLED SET OF JAVA TECHNOLOGIES FOR XML -- CONSISTS OF JAXP (XML PROCESSING), JAXB (XML BINDING). JAXM (XML MESSAGING), JAX-RPC (XML-BASED RPC), AND JAXR (XML REGISTRIES).

THESE TECHNOLOGIES FOR XML ARE AVAILABLE AS SEPARATE SPECIFICATIONS, APIS, AND REFERENCE IMPLEMENTATIONS (SOME SPECS/IMPLEMENTATIONS ARE GENERALLY AVAILABLE: OTHERS ARE WORKS IN PROGRESS). HOWEVER, JAX PACK IS ALSO AVAILABLE AS A COMBINED SET OF ALL THE JAX TECHNOLOGIES IN A SINGLE DOWNLOAD. THE STANDARDS/SPECIFICATIONS REPRESENTING THE VARIOUS JAVA TECHNOLOGIES FOR XML HAVE BEEN DEVELOPED COLLABORATIVELY WITH THE JAVA COMMUNITY PROCESS (JCP: SEE SIDEBAR).

THE OBJECTIVE OF THIS ARTICLE IS TO WALK THROUGH THESE APIS, REVIEW THEIR FUNCTIONALITY. AND, USING CODE EXAMPLES. ILLUSTRATE HOW THEY CAN BE USED WITHIN APPLICATIONS.

JAXP

Fundamental to the fusion of Java and XML technologies, the Java API for XML Processing provides a set of APIs for parsing, creating, and transforming XML documents. JAXP supports both the memory-based DOM2 (Document Object Model) and the event-based SAX2 APIs for XML parsing (Simple API for XML). With the 1.1 release JAXP also supports XSLT-based transformations, a critical component that adds a new level of abstraction and ease to transforming XML documents into other XML vocabularies, plaintext, and even print media (using XSL Formatting Objects).

Given this introduction to JAXP, you may wonder why, since a large number of companies have built their own XML parsers and XSLT processors, we need another one.

The answer is simple: JAXP isn't just another XML parser. Instead, what JAXP APIs and the reference implementation provide is a standard set of Java APIs that define a factory-based pluggable framework for XML parsers and XSLT processors (as illustrated in Figure 1).

[FIGURE 1 OMITTED]

The reference implementation of JAXP uses the newly released Apache Crimson (http://xml. apache.org/crimson/) as the XML parser and Apache Xalan (http://xml.apache.org/xalan-j/ index.html) as the default XSLT processor, but it's really a matter of calling some APIs and setting some system properties if you'd like to use your favorite parser/processor.

A key component missing from the JAXP API set is the support for XML Schemas, expected in future releases. JAXP does support document type definition (DTD) based XML validation and using a third-party parser such as Apache Xerces (http://xml.apache.org/ xerces-j/index.html) or Apache Xerces2 (http: //xml.apache.org/xerces2-j/index.html). Setting a couple of attributes to indicate that your application needs XML Schema validation is what's required.

JAXP has been a popular API; it's been incorporated in the newly released J2EE v1.3 specification to provide XML parsing/processing capability to server-based enterprise applications. It's also been incorporated by a large number of third-party application servers and other products. As another endorsement of this key API, JAXP 1.1 has been included as a core aspect of the new version of the Java platform (J2SE v1.4).

A simple code snippet is worth a thousand words. Following is a...

View this article FREE - Now for a Limited Time, try Goliath Business News
Free for 3 Days!



More articles from XML Journal
SOAP, messages with attachments.(Technical), January 01, 2002
Using the IBM XML security suite: part 2 of 2: encrypting XML document..., January 01, 2002
XML enabled applications: need for speed: here's help when your applic..., January 01, 2002
Data Junction Integration Suite. (Product Review)., January 01, 2002
XML-J's sister magazine ranked first in survey. (XML News).(Brief Arti..., January 01, 2002

Looking for additional articles?
Search our database of over 3 million articles.

Looking for more in-depth information on this industry?
Search our complete database of Industry & Market reports by text, subject, publication name or publication date.

About Goliath
Whether you're looking for sales prospects, competitive information, company analysis or best practices in managing your organization, Goliath can help you meet your business needs.

Our extensive business information databases empower business professionals with both the breadth and depth of credible, authoritative information they need to support their business goals. Whether it be strategic planning, sales prospecting, company research or defining management best practices - Goliath is your leading source for accurate information.