Consultancy Services jobs Etisalat CEO ZANTEL
etisalat

Custom Search
Share/Save/Bookmark Subscribe

Java XML part 2

Posted by Anonymous | 5:22 PM | | 0 comments »

Java XML






XML Basics
In order to use XML, the document must comply with certain rules to be Well Formed.

The Well Formed rules for XML documents are:

1.Tags must be nested.


2. You cannot omit end tags
In HTML manydevelopers leave out </br> and </p> tags.
Most browsers will handlethis correctly.

3. New syntax for end tags.

<car engine=”3000”></car>
<car engine="3000"/>

These are the same.

4. All documents must be contained in the root element.

Any document is well formed if it agrees with above rules.

If the document is to be checked for validity, the document uses a Document Type Definition (DTD). The document must begin with and agree to the above rules.

Why use XML in Java?
XML and Java work very well together.
1. Portability – Java is a platform independent development language. XML is an architecture and language independent data format. Both Java and XML do not care about the platform.
2. Extensive development support – There is good API support in Java for XML.

People are using XML for conducting business-to-business transactions and a standard way for different computers to communicate with each other.

Application areas of XML

1. Presentation Oriented Publishing (POP) – the same data in a web browser, mobile phone and a PDA.
2. Message Oriented Middleware (MOM) – B2B.
This is where an application uses XML as a message format for communication between different systems.

3. XML used for exchanging database contents.
To illustrate the applications we will use an example of an online shopping system:

1) The owner of the online shop wants to provide an online service so that it also works on mobile phones and PDAs.
Data in the store database is used to generate a XML document. This same XML document can be transformed using XSL (covered in a later section) into HTML, WML or any other format. This would allow the information to be displayed on mobile phones and PDA.
2) The owner wants to automate order processing and fulfillment.
Since the 1970s, systems have used Electronic Data Interchange for computer-to-computer communication. This allowed orders and invoices to be sent using a messaging standard.
The problem with EDI is that it is very expensive to buy and EDI system, therefore only large companies would use it.
Two companies agreeing on a DTD can send messages over the Internet using XML. Problems occur regarding security and reliability but these are being addressed.
Going back to our example, when a customer orders a product from the online shop, the shop sends a standard message to the delivery agent. The delivery computer system automatically updates itself with the latest orders and automatically sends an acknowledgement back to the shop.
Messages could also be sent from the suppliers to the online shop to update the inventory on the specific products.
3) The marketing department would like to extract the data from the online shop so they can organize product promotions and sales.
However, the marketing database is in MS Access and the shop uses Oracle. There is no specific standard for exchanging data from one database to another.
XML allows all the tables to be totally described by using custom tags.
<table>
<field>
etc..,

Standards
There are several standard bodies involved in Java and XML.

XML specifications
From a specifications perspective World Wide Web Consortium (W3C) provides the base specifications for XML.
http://www.w3.org/
Developing Applications using XML

The Apache XML project provides open source XML implementation solutions.
You can find the following at the Apache XML site:
http://xml.apache.org/

Listed below are the Apache projects related to using XML in Java:

Xerces - XML parsers in Java, C (with Perl and COM bindings)
Xalan - XSLT stylesheet processors, in Java and C
Cocoon - XML-based web publishing, in Java
FOP - XSL formatting objects, in Java
Xang - Rapid development of dynamic server pages, in JavaScript
SOAP - Simple Object Access Protocol
Batik - A Java based toolkit for Scalable Vector Graphics (SVG)
Crimson - A Java XML parser derived from the Sun Project X Parser.The Java Community Process (JCP) also has developed a comprehensive set of application programming interfaces (API) for developing XML applications in Java.

In this tutorial you will see how to develop XML applications in Java using different methods. All the methods are based on downloadable and free tools and technologies.

0 comments

free counters
Your Ad Here

Cross Rates Powered by Forex Pros - The Forex Trading Portal.
java.sun.com jobs etisalat actress hot sex
Bangalore, 04 March 2008, UAE Telecoms Gaint founds ‘technologia’ in Bangalore to create continuous stream of new innovations. Affordable Website Design
Free Search Engine Submission
Free Search Engine Submission
Submit Your Site To The Web's Top 50 Search Engines for Free! BigDirectory.org - free url submission, online website directory National Directory Free Web Directory Submission - Dotster Directory Link Popularity Building
We offers advanced Link Popularity Services for small to large static, dynamic and eCommerce websites.
http://www.links-builder.com
India Search Engine and Web Directory Superblog Directory
HOT SEX,NUDE TECHNOLOGIAWORLD SQL JAVA SUN BEA IBM HCL SATYAM TCS CHIRANJEEVI CHIRU PAWAN HANSIKA SANGAVI SNEHA TAMIL SEX MALLU MASALA