Java News Brief
OCI AUGUST ISSUE
4500 S. Lakeshore Drive, Suite 359, Tempe, AZ
85282 Office: 480-752-0042 1-888-962-4624
Java Technical Insight of the Month - What is XML?
OCI Education Center - Java Programming
Why Java? here are a few reasons...
Java Technical Insight of the Month
What is XML?
By Mark Volkmann, Principal Software Engineer, Object Computing, Inc.
XML, which stands for Extensible Markup Language, is a markup language that can be used to define custom "tags" similar to HTML tags. It is a subset of another markup language, Standardized General Markup Language (SGML), that is considered to be too complex for wide-spread use.
One of the main goals of XML is to separate document content from its formatting. HTML combines content and formatting resulting in documents that are difficult to use as sources of data for software applications.
XML documents are human-readable, unlike databases and many file formats. This makes XML a very portable data format. XML documents can be easily processed by programming languages such as Java and C++ for which XML parsers have been written. IBM, Sun, Microsoft, and others have XML parsers which are currently freely available.
The tags that are allowed in a particular XML document and their nesting relationships can be limited by Document Type Definition (DTD). Many industries are in the process of defining standard DTDs that will simplify data interchange between related applications.
How are XML documents displayed?
XML documents can be displayed in web browsers. If a browser supports XML, then XML documents can be displayed by referencing their URL just as is done for HTML documents. For browsers that do not support XML, they can be translated to HTML on the web server. Java servlets can be used to do this.
Style sheets can be applied to XML documents to format them for output. There are two popular kinds of style sheets. Cascading Style Sheets (CSS) can be used to format both HTML and XML documents. Extensible Style Language (XSL) can only be used with XML documents. CSS is much simpler than XSL but lacks many of its features. CSS simply looks for specific XML tags and formats their content using a given set of HTML tags. XSL has two parts, formatting and transformation. It has the same formatting capabilities as CSS. The transformation capability allows document content to be filtered and reordered through its own pattern-matching mechanism and scripting language.
The tool market for XML is still maturing. There are some XML editors available now.
Many database vendors will be adding the capability to output the results of database queries in XML format. This will make it easy to display those results in a web browser. Style sheets can be used to format this output.
There are two common APIs that can be used by software applications to process data in an XML document, SAX and DOM.
Simple API for XML (SAX) is an event-driven API. As it parses an XML document, it sends "events" to applications indicating the kinds of tags (or elements) it has encountered. Applications are written to perform specific actions in response to the events.
Document Object Model (DOM) is a data-driven API. As it parses an XML document, it builds a tree data structure describing the document content. This tree structure can then be traversed multiple times to extract data. New elements can be added to the tree. Existing elements can be removed. The resulting tree can be output to create a brand new XML document. XML documents can even be created from scratch using DOM.
The World Wide Web Consortium (W3C) creates specifications for nearly all web-based technologies. While the W3C doesn't control the implementation of these technologies through licensing agreements, their recommendations are well respected. Most vendors follow their recommendations rather that risk having their products be perceived as non-standard.
Prentice Hall has an excellent series of XML books. Object Computing also offers a course on XML called "Introduction to XML". For a description of this course, see http://www.ociweb.com/education/index.html.
OCI Education Center - Java
Java Programming and Advanced Java Programming are excellent preparatory courses for certification testing. Call 480-752-0042 or 1-888-962-4624 to enroll or for more information.
Java Programming - 4 days
The Java Programming course provides developers with broad coverage of the basic capabilities of Java so that they can begin writing Java applets and applications. This course goes beyond teaching the syntax of the language and basic object-oriented techniques by teaching how to create AWT user interfaces and take advantage of file I/O capabilities for storing and retrieving data.
Learn how to:
-Differentiate between Java applets and applications
-Understand major object oriented programming concepts
-Understand the fundamental syntax of the Java language
-Use the tools in the Java Development Kit
-Create graphical user interfaces using AWT
-Simplify error checking with exception handling
-Use I/O Streams
Advanced Java Programming - 3 days
Advanced Java takes developers beyond the basics by examining multiple ways to create distributed applications (sockets and RMI) and manage persistent data (object serialization and JDBC). It also covers how to integrate existing, non-Java code into a Java application.
Learn how to:
-Use advanced capabilities such as native methods, multithreading, and sockets
-Save and retrieve objects to and from files
-Query databases using Java Database Connectivity (JDBC) compliant database drivers
-Invoke methods in remote Java objects using RMI
-Determine and use the constructors, fields, and methods of any object at runtime
Why Java? here are a few reasons...
-Portability - application logic, user interfaces, database access; ...not perfect portability but much better than other languages.
-Support for Web-based Applications - applets for client-side processing; servlets for server-side processing
-Built-in support for multi-threading
-Built-in support for socket communication
-Support of network protocols
-Provides multiple ways of creating distributed applications - sockets, RMI, CORBA, Enterprise Java Beans, Mobile Agents, Servlets and JavaSpaces
-Object-Oriented - reuse; maintainability, extensibility
-Automatic garbage-collection (memory management)
-Productivity - easier syntax than C++, no need to relink after each code change (speeds debugging)
Object Computing, Inc. is a Sun Authorized Java Center in St. Louis and a Member of the Object Management Group, OMG. OCI specializes in distributed computing using object-oriented and web-enabled technologies and provides Consulting, Education, and Product Development services to clients nation-wide. For more information contact us at 314-579-0066 or email info.
For employment opportunities at OCI call 1-888-962-4624
or email hr.
The Java News Brief is a monthly newsletter. The purpose and intent of this publication is to advance Java, provide technical value, and to announce available OCI Java services. If you would prefer to not receive this newsletter or would like to subscribe please email JNB and enter SUBSCRIBE or UNSUBSCRIBE within the Subject line.
Copyright (c) 1999. Object Computing, Inc. All rights reserved. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Object Computing, Inc. is independent of Sun Microsystems, Inc.