XML and EDI

printer-friendly version of this section  Print  e-mail this section  E-Mail  add a public, group or private note  Add Note  add a bookmark about this section  Add Bookmark    

Java APIs for XML Kick Start
By Aoyon Chowdhury, Parag Choudhary

Table of Contents
Chapter 1.  Using XML for Electronic Data Interchange


Today XML is an industry-standard, extensible, system-independent way of representing and exchanging data. This is achieved in two ways:

  • The use of a tagging mechanism in which the tags indicate the content and structure of the data they enclose. For example, the following code shows how the information about a book is stored in an XML document:

    <booklist> <book>         <name>Java APIs for XML</name>         <author>Aoyon Chowdhury and Parag Choudhary</author>         <isbn>1234</isbn>         <publisher>sams</publisher>         <price>40</price> </book> </booklist> 

    The <book> and the </book> tags tell a parser that the information between them is about a book. The other tags specify the book's author, ISBN number, publisher, and price. Similarly, you can define and use your own tags to describe your content. The fact that the tags are user-defined is what gives XML its extensibility.

  • The portability of data is ensured by the use of DTDs, or XML Schemas. DTDs describe the tags, and the order in which they can appear in an XML document. These provide a consistent understanding of the XML data by different applications. For example, the DTD for our book would be as follows:

    <!ELEMENT bookList(book)+> <!ELEMENT book (name, author, isbn, publisher, price) > <!ELEMENT name (#PCDATA) > <!ELEMENT author(#PCDATA) > <!ELEMENT isbn (#PCDATA) > <!ELEMENT publisher(#PCDATA) > <!ELEMENT price(#PCDATA) > 

    Therefore, any application, when given the bookList XML file along with the bookList DTD, can process the document as per the rules specified in the DTD. This implies that applications residing on different platforms and operating systems can share data with each other, as long as they agree on the format and the structure of the content.

XML is fast becoming the communication medium of choice for enterprises sharing data within their own departments or with other enterprises.

The Internet world is also seeing a new breed of applications called Web services. These applications can share information between enterprises using XML as the communication medium and Internet protocols as the backbone.


printer-friendly version of this section  Print  e-mail this section  E-Mail  add a public, group or private note  Add Note  add a bookmark about this section  Add Bookmark    
Top

[0672324342/ch01lev1sec1]

 
 


JavaT APIs for XML Kick Start
JAX: Java APIs for XML Kick Start
ISBN: 0672324342
EAN: 2147483647
Year: 2002
Pages: 133

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net