Class:
Waterfowl Data: Bill(String), Webbed Feet, Neck(String) Methods: Walk(String), Vocalization(String) Class: Duck extends Waterfowl Data: Bill ("wide"), Neck("short") Methods: Walk ("waddle"), Vocalization("quack") Class: Goose extends Waterfowl Data: Bill ("long"), Neck("long") Methods: Walk ("waddle"), Vocalization("honk") |
Another approach to data interchange between objects is XML. XML is a protocol for defining datafile formats. It is not a file format per se. Rather, XML standardizes how data files are defined.
Although XML is still an evolving set of protocols, several components are critical to XML:
a -In this example, an application has been programmed to read a specific type of XML file. An object is created within the application based on the specifications in the XML file.
b - Conversely to a, an object in the application is translated to an XML representation, and written to a file.
c - This is a complex example. Data from a binary database is written to an XML file. At top, an client program, specialized for this particular XML data type, reads the XML and creates an object.
If a stylesheet exists for this XML data type, a browser can import the same XML file and render it as a Web page. In this case, a complex page, consisting of text, graphics, and a Java applet, is rendered.
XML is still evolving! Use with caution! The standards for XML are still under development, particularly with regard to XSL stylesheets, XML schemas, and XML browsers. As well, in particular fields, numerous mutually incompatible DTDs may exist for the same type of data object! For example, an XML file for a DNA sequence or a protein, produced by one program, may be unreadable by another program, even though both programs can read XML. |
http://www.visualgenomics.ca/gordonp/xml/
http://home.cc.umanitoba.ca/~frist/Seminars/iims07/iims07.html | ||
|
|
|