Java Technology Home Page
A-Z Index

The Source for Java Technology

 

Downloads, APIs, Documentation
Java Developer Connection
Docs, Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide

Java Technology
& XML
Downloads &
Specifications
News & Articles
White Papers
Learning Center
Resources
FAQ
Mailing List
Web Services

JAVATM TECHNOLOGY & XML
FREQUENTLY ASKED QUESTIONS


GENERAL

Q. What is XML?

A. XML, the Extensible Markup Language, is a universal syntax for describing and structuring data independent from the application logic. XML can be used to define unlimited languages for specific industries and applications.

Q. Who developed XML?

A. XML is an activity of the World Wide Web Consortium (W3C). The XML development effort started in 1996 led by Jon Bosak of Sun Microsystems, who continues to chair the XML Coordination Group today.

Bosak organized a diverse group of markup language experts, from industry to academia, to develop a simplified version of SGML (Standard Generalized Markup Language) for the Web. In February 1998, XML 1.0 specification became a recommendation by the W3C. For more information about the birth of XML, read Jon Bosak's "The Birth of XML: A Personal Recollection"

Q. What are the key benefits of XML?

A. XML promises to simplify and lower the cost of data interchange and publishing in a Web environment. XML is a text-based syntax that is readable by both computer and humans. XML offers data portability and reusability across different platforms and devices. It is also flexible and extensible, allowing new tags to be added without breaking an existing document structure. Based on Unicode, XML provides global language support.

Q. What are the applications of XML?

A. XML is poised to play a prominent role as a data interchange format in business-to-business Web applications such as e-commerce, supply-chain management, workflow, and application integration. Another use of XML is for structured information management, including information from databases. XML also supports media-independent publishing, allowing documents to be written once and published in multiple media formats and devices. On the client, XML can be used to create customized views into data.

Q. What is the relationship between XML and the Java technology?

A. XML and the Java technology are complementary. The Java technology provides the portable, maintainable code to process portable, reusable XML data. In addition, XML and Java have a number of shared features that make them the ideal pair for Web computing, including being industry standards, platform-independence, extensible, reusable, Web-centric, and internationalized.

Q. What are the benefits of using the Java technology with XML?

A. The Java technology offers a substantial productivity boost for software developers compared to programming languages such as C or C++. In addition, developers using the Java platform can create sophisticated programs that are reusable and maintainable compared to programs written with scripting languages. Using XML and Java together, developers can build sophisticated, interoperable Web applications more quickly and at a lower cost.

Q. How can I learn more about working with XML?

A. The new version of the Java XML tutorial will be available in March. It can quickly get you up to speed writing XML code and XML-based Java applications. The tutorial walks you through the basics of using the Simple API for XML (SAX). The tutorial for the Document Object Model (DOM) is coming soon!

Q. What XML technologies are being developed for the Java Platform?

A. Sun is leading efforts to deliver first-class XML support in the Java platform. Through the Java Community Process, two initiatives are in progress: a Java optional package for XML parsing and XML data binding, a project codenamed "Adelard." XML is also used in Java 2 Enterprise Edition (J2EE) as an essential means of information interchange in disparate business systems.

Q. What XML-related activities is Sun participating in?

A. Sun is actively participating in W3C working groups for XML Stylesheet/Transformation Language (XSL/T), XML Schema, Xlink, and XML Query. Sun is also participating in a number of other industry consortia including Oasis, XML.org, and Apache.

Q. Multiple parsers are available. Which one should I use?

A.There are several different parsers for the Java platform, and one "standard" API that encompasses them. The parser available from Sun is Project X, and the one from Apache organization is Xerces. In addition, IBM and several other vendors provide parsers. The API that encompasses them is the Java API for XML Parsing, JAXP. Here is an overview of JAXP, Xerces, and Project X:

  • JAXP is the community standard, industry standard API. The purpose of this API is to provide a totally stable API that is consistent with established XML standards. This is the API you will want to use for production products, once it reaches it's final release. (The license doesn't permit that while it's in it's early access stages, since the APIs could change and testing is not yet complete.) This is a "pluggable" API that lets you plug in parsers from different manufacturers. See Java API for XML Parsing (JAXP), below.
  • Xerces is the parser produced by the Apache organization. It's goal is to combine the best features of all the available parsers, including Project X. Xerces tracks the latest standards proposals, so it is likely to change, but it is also at the leading edge. It is JAXP compliant, but also comes with extensions that anticipate future standards. See xml.apache.org, below. For insights on how you access those extensions within the JAXP framework, see the discussion, How do JAXP and Project X differ, below.
  • The Project X parser, Technology Release 2, lies at the heart of Sun's reference implementation for JAXP. Advanced Project X implementations, which are not published so as not to bias the community standard, continously track and anticipate future standards to ensure the reference implementation is up-to-date. See Other XML Technologies, below.

Q. Where can I send comments and suggestions?

A. For feedback on the project, please send email to xml-feedback@eng.sun.com.

Q. Are there other Sun hosted XML mailing lists I can subscribe to?

A. For general discussion about topics related to XML technologies in the Java platform, subscribe to xml-interest@java.sun.com. For Sun announcements to the community about technology releases, news and updates related to XML technologies in Java Platform, subscribe to xml-announce@java.sun.com. For instructions about how to subscribe, see the Mailing Lists section on java.sun.com/xml.


JAVA API FOR XML PARSING (JAXP)

Q. What is the Java API for XML Parsing?

A. The Java API for XML Parsing provides basic functionality for reading, manipulating, and generating XML documents through pure Java APIs. It is a thin and lightweight API that provides a standard way to seamlessly integrate any XML-compliant parser with a Java application. Depending on the needs of the application, developers have the flexibility to swap between XML parsers (such as high performance vs.memory conservative parsers) without making application code changes. Thus, application and tools developers can rapidly and easily XML-enable their Java applications for e-commerce, application integration, and web publishing.

Q. What Java runtime environment is required to run the software?

A. The XML Parsing API will run in both JDK 1.1.8 and the Java 2 platform.

Q. Is this software compliant with Java Project X?

A. Yes. The JAXP reference implementation (RI) uses the high performance Java Project X as its default parser.

Q. What is the relationship between the JAXP Reference Implementation and Java Project X?

A. The JAXP RI contains a "pluggable" API layer and the Java Project X parser. Since JAXP has shipped, separate Web download of Java Project X has been discontinued. It is recommended that if you are currently using the Java Project X release, you migrate to JAXP.

Q. Will this software work with other XML parsers besides Project X?

A. The software's pluggable architecture supports any XML conformant parser provided the parser implements the JAXP javax.classes.

Q. How does JAXP work from a technical perspective?

A. JAXP defines factory classes you use to get a SAX parser or DOM document builder. (When you use Project X directly, you don't use those factory classes.) With JAXP, the factory you get is controlled by system properties you can set from the command line. That lets you plug in a different parser without changing the app. To make that possible, though, JAXP is necessarily limited to fully-codified standards. At the moment, that means SAX 1.0 and DOM 1.0. Once SAX 2.0 and DOM 2.0 get nailed down, the need for extensions will mostly dissipate, but in the meantime some apps may require an extension implemented in a particular parser. To do that, you set the system property to use that factory, and then cast the parser it creates back to the actual implementation class. (For example, if system property settings give you an instance of the Project X reference implementation, you can cast the parser back to the appropriate com.sun.xml class.) Then you can use all the extensions you want. However, you are giving up a certain measure of portability, and the extended APIs presented by the parser are likely to be implemented differently in future SAX 2.0 or DOM 2.0 versions.

Q. What are the requirements for an "XML conformant" parser?

A. The specification requires parsers to conform to the W3C XML 1.0 specification, SAX 1.0 API, DOM Level 1 Core, and XML Namespace.

Q. Who is involved in developing the software?

A. Through the Java Community Process, the optional package is being developed in an industry-participative manner. Key contributors to the initial draft specification include Ariba, AOL/Netscape, BEA/Web Logic, Bluestone, Fujitsu, IBM, Oracle, among others. The specification is open for review and comments by over 300 participants in the Java Community Process as well as the general public.

Q. When is the software scheduled to ship?

A. The shipping release is targeted for first quarter of 2000.

Q. Where can I send comments about the specification?

A. Please send comments to xml-spec-comments@eng.sun.com.

Q. How do I access the contents of a DTD in JAXP 1.0?

A. The current XML-processing standards do not provide any mechanism for reading the content of a DTD. As a result, that mechanism does not exist in JAXP 1.0.


XML DATA BINDING

Q. What is XML data binding?

A. XML data binding is a technique for simplifying the creation and maintenance of XML-enabled Java applications. Sun has started a new project, code-named "Adelard," that will provide a schema compiler and a runtime framework to support a two-way mapping between XML documents and Java objects. Adelard's schema compiler will translate XML schemas into one or more Java classes without requiring the developer to write complex parsing code. These classes will contain automatically-generated code to perform automatic error and validity checking of incoming and outgoing XML messages, thereby ensuring that only valid, error-free messages are accepted, processed, and generated by a system. For more information, see the Java Specification Request 31 (JSR-31) and the design note, "An XML Data-Binding Facility for the Java Platform."

Q. What is the code name for the XML data-binding project, and what does it mean?

A. The code name is "Adelard." Adelard of Bath (1075-1160) was a famous translator of scientific texts during the Middle Ages. He studied and taught in France and travelled in Italy, Syria, and Palestine. After returning to Bath he became a teacher of the future King Henry II. Adelard is best known for his translation of Euclid's <i>Elements</i> from Arabic sources into Latin; for centuries this translation was the leading geometry text in the West.

Q. Who is involved in developing Adelard?

A. Adelard is being developed through Java Community Process with an expert group consisting of Allaire, AOL/Netscape, Bluestone, Extensibility, Fujitsu, IBM, Object Design, Oracle, Sun Microsystems, and webMethods. Sun is an active member of the W3C XML Schema Working Group and is also working with other industry consortia such as Oasis and xml.org.


Java 2 Platform, Enterprise Edition

Q. Does the Java 2 Platform, Enterprise Edition (J2EE) use XML?

A. The Java 2 Platform, Enterprise Edition (J2EE) promotes the use of XML for data messaging between loosely-coupled business systems. The J2EE reference implementation includes the Java Project X parser and specific technologies within J2EE already make use of XML.

Java Server Pages can generate and consume XML between multi-tier servers or between server and client. Java Messaging Service provides an asynchronous transport mechanism for XML data messaging. Enterprise JavaBeans offers a robust, synchronous transport mechanism by allowing a business service object to be invoked by XML tags. EJB also uses XML to describe its deployment properties, such as transactions and security.

Q. Can I generate dynamic XML documents using JavaServer PagesTM?

A. The JavaServer Pages technology enables the authoring of XML pages. XML pages can be generated using JSP pages, which include elements to produce the dynamic portions of the document. The JSP 1.1 specification includes a powerful tag extension mechanism that can be used to perform XML-based operations, such as applying an XSLT transformation to an XML document.


xml.apache.org

Q. What is Sun?s involvement in the Apache XML project?

A. Sun is working with Apache to develop XML tools through an industry project called xml.apache.org, which was announced in November. The project was created in response to the overwhelming demand for open source XML and XSL tools triggered by the rapid adoption of XML. Through the Apache developer community, xml.apache.org aims to create a best-of-breed XML parser, named Xerces, based on parser technologies donated from Sun, IBM and other vendors. Other XML technologies donations have come from Bowstreet, DataChannel, Exoffice, and Lotus Development Corporation.

Q. What XML technologies have been donated by Sun?

A. Sun has commited to donating two XML technologies: Java Project X, including unreleased advanced implementations, and XHTML Parser. See Java Project X description below. XHTML Parser is an experimental parser for reading and writing XHTML, the Extensible HyperText Markup Language, based on the "Swing" HTML parser in the Java Foundation Classes. XHTML is a reformulation of HTML 4.0 in XML 1.0 and is currently a W3C Working Draft.

Q. What will the relationship be between Xerces and JAXP?

A. The Java API for XML Parsing specification will continue to be driven out of the Java Community Process while xml.apache.org focuses on XML implementations. Sun will continue to release the JAXP reference implementation and will evaluate supporting Xerces in a future JAXP release. In meantime, JAXP?s pluggable architecture allows any XML-conformant parser, such as Xerces, to be substituted in place of the default Project X parser.


OTHER XML TECHNOLOGIES

Q. What is Java Project X?

A. Java Project X is an experimental technology that provides core XML services for reading, manipulating and generating XML data. This package features an extremely fast validating and non-validating XML parser that is fully compliant to the W3C XML 1.0 recommendation, SAX 1.0, DOM Level 1 Core, and XML Namespaces.

Project X is now included in the reference implementation of the Java API for XML Parsing software, which can be downloaded for free commercial use.


[ This page was updated: 14-Aug-01 ]

Products & APIs - Developer Connection - Docs & Training - Support
Community Discussion - Industry News - Solutions Marketplace - Case Studies
Glossary - Feedback - A-Z Index

For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-2001 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.