IBM®
Skip to main content
    United States change      Terms of use
 
 
Select a scope:    
     Home      Products      Services & industry solutions      Support & downloads      My account     
alphaWorks  >  XML  >  

XML Enhancements for Java

A set of language extensions that facilitate XML processing in Java. (This is an ETTK technology.)


Date Posted: March 31, 2005
This is an ettk technology.
OverviewRequirements Download FAQs Forum Reviews

Update: November 22, 2006

New release includes support for updates and better XPath compilation and typechecking.

What are XML Enhancements for Java?

XML Enhancements for Java™ (XJ) is a framework for writing efficient XML processing applications more easily. XJ includes a set of extensions to Java 1.4 that integrate support for XML, XML Schema, and XPath 1.0 into the language. The advantages of XJ over existing mechanisms for XML development are as follows:

  • Familiarity (to the XML programmer): XML processing in XJ is consistent with open XML standards.
  • Robustness: XJ programs are strongly typed with respect to XML schemas. The XJ compiler can detect errors in uses of XPath expressions and construction of XML data.
  • Easier subscription and support: Because XJ programs are written in terms of XML and not low-level APIs such as DOM or SAX, they are easier to maintain and modify if XML schemas change.
  • Performance: Because the compiler is aware of the use of XML in a program, it can optimize the run-time representation, parsing, and XPath evaluation of XML.

In XJ, one can import XML schemas just as one does Java classes. All the element declarations in the XML schema are then available to programmers as if they were Java classes. Programmers can write inline XPath expressions on these classes, and the compiler checks them for correctness with respect to the XML schema. In addition, the compiler performs optimizations in order to improve the evaluation of XPath expressions. A programmer may construct new XML documents by writing XML directly inline. Again, the compiler ensures correctness with respect to the appropriate schema. By integrating XML and Java, XJ allows programmers to reuse existing Java libraries in the development of XML code and vice-versa.

This technology is part of the Emerging Technologies Toolkit (ETTK), a special collection of emerging technologies from IBM's software development and research labs. It runs on Windows®, Linux®, and UNIX®.

How does it work?

The XJ package includes a compiler xjc analogous to javac and an execution environment xj analogous to java. All Java programs can be compiled "as is" without modifications, using xjc, and can be run using xj. In addition, xjc compiles programs written using the XJ XML extensions into pure Java code where all accesses to XML data are performed using DOM accesses.

For further information, please visit the XJ Research Web site, including a tutorial on XJ.


About the technology author(s):
Significant contributors to XJ are as follows: Rajesh Bordawekar, Michael Burke, Rohit Fernandes, Matthew Harren, Igor Pechtchanski, Mukund Raghavachari, Vivek Sarkar, and Oded Shmueli. All the work was performed at the IBM T. J. Watson Research Center in Hawthorne, NY.

Download now Download now

Related technologies

For platform(s):
Linux, Windows, UNIX

For topics:
Emerging Technologies Toolkit (ETTK), Java technology, optimization, performance, XML, XPath


Related resources

jStart can supply assistance in deploying a solution or prototype at your business using this ETTK technology

Simplify XML processing with XJ

Press Articles

 

    About IBM Privacy Contact