Bridging the Gap Between Java and XML

How Java Technologies Revolutionize Access to XML's Powerful Functionality

By The Info Geeks, published Oct 31, 2007
Published Content: 92  Total Views: 100,481  Favorited By: 4 CPs
Rating: 3.0 of 5
Simplicity is a hallmark of the Extensible Markup Language (XML). XML is regarded as an extensible language because with it, the user can define his/her own tags. XML is a cross-platform, text-based standard through which complicated data structures can be expressed in a far more elementary way. Java technologies can be used to access and take advantage of this feature of XML.

Java is an object-oriented programming language (OOP) that was originally developed for use in embedded systems such as those of cell phones. However, it has since become an increasingly important in developing dynamic web pages. Two important mechanisms for implementing this are Java Applets and the Java servlets. Add to this the functionality of JavaBeans and the advantages of using Java increases tenfold.

Java Applets are programs that are embedded into web applications to provide them with interactive features that are not available through HTML. Java Servlets are pretty similar to the applets, except that they run on the server side.

The JavaBeans concept is a feature of Java that allows for the rapid development of a given application through the use of a visual buider.DOM one of the means by which to access the structure of an XML document. Alternatively, you may use an event-based API such as SAX. SAX is a simple API specifically developed for XMLDocumentHandler.

Here's how a DocumentHandler is used:
·Import the parser interface.
·Create an instance of the SAX driver.
·Create a parser object using the SAX driver.
·Now register an instance of the class MyHandler as aDocumentHandler.

There is a set of Java libraries called JOX, which will enable you to transfer data between your XML documents and JavaBeans. JOX works by matching the XML document to the fields of a JavaBean. Also, if a DTD is available, it will use this when it writes an XML document.

In this way, JOX enables you to use any given form of XML document and any JavaBean without having to create a separate schema. With other libraries, you need a separate schema so as to describe the mapping between XML an Java.

Bridging the Gap Between Java and XML

Simplicity is a hallmark of XML, a text-based standard through which complicated data structures can be expressed in a far more elementary way. Java technologies can be used to access and take advantage of this feature of XML.

Credit: GNU

Copyright: GNU

Takeaways
  • JOX is a set of Java libraries that enable you to transfer data between XML documents & Java beans
  • Java Applets are programs that are embedded into web applications to provide them with interactive f
  • XML stands for Extensible Markup Language
Did You Know?
Simplicity is a hallmark of XML, a text-based standard through which complicated data structures can be expressed in a far more elementary way. Java technologies can be used to access and take advantage of this feature of XML.
Comments
Type in Your Comments Below - (1000 characters left)
Your name:

Submit your own content on this or any topic. Get started »
Most Commented On