Retired Document
Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer be valid.
Introduction to WebObjects XML Serialization Guide
This document explains how to you can use XML serialization in your applications. Binary serialization is a simple and efficient way of serializing data. To see this appealing format, invoke the cat
command on an executable file. Binary is a wonderful format for computers to use, but it's not easy for people to understand. XML (Extensible Markup Language) is a specification that defines a format that can be used to represent data in a way that is more understandable to human beings than binary is.
The Java language has an excellent API for binary serialization. WebObjects extends that API to provide you with XML serialization.
Encoding objects and data into XML documents allows you to easily view and modify objects and data in their serialized form. It also lets you share information between applications, systems, and even organizations using a standard format. In addition, when receiving streams of serialized data over the Internet, you may want to make sure that the document is valid before deserializing it. XML serialization provides you with facilities to accomplish this.
What You Should Already Know
This document assumes that you are familiar with XML, binary serialization in Java, and Sun's security manager. If you plan on using the XSLT processor included with WebObjects or one of your own, you should have enough knowledge of Extensible Stylesheet Language Transformations (XSLT) to develop XSLT stylesheets. Additional Resources provides a list of resources that get you started in Java binary serialization and XSLT.
You should also have experience developing WebObjects applications. In particular, you need to know how to create applications using Project Builder (the project-management tool of WebObjects). See Additional Resources for a list of documents that address this and other essential subjects.
Organization of This Document
The document contains the following chapters and appendixes:
XML Serialization Overview provides you with an overview of XML, XML Schema files, document type definition (DTD) files, XML namespaces, and XSLT.
XML Serialization Essentials explains XML serialization in WebObjects. In particular, you learn about the API used to serialize and deserialize objects and data, security, and versioning.
Serializing Objects and Data walks you through the creation of a project that implements both binary and XML serialization.
XML Transformation explains the process of transforming XML documents using an XSLT processor. It also contains details on how you can use your favorite XML parser and transformer in WebObjects applications and some performance issues to keep in mind when serializing and transforming data.
Transforming XML Documents expands the project introduced in Serializing Objects and Data by adding transformation of serialized data.
The woxml.dtd file contains listings of the XML Schema and DTD files that define the format of XML documents that represent serialized data.
Code Listings contains listings of example classes and the XSLT script introduced in Transforming XML Documents.
This document also contains a glossary of terms and an index.
Serializing Objects and Data and Transforming XML Documents walk you through developing applications that use binary and XML serialization. The projects created in those chapters are included in /Developer/Documentation/WebObjects/XML_Serialization/Projects
. As a companion to the document, there is a compressed version of the projects at http://developer.apple.com/documentation/WebObjects.
See Also
If you need to learn the basics about developing WebObjects applications, you can find that information in the following documents:
WebObjects Overview provides you with a survey of WebObjects technologies and capabilities.
WebObjects Web Applications Programming Guide shows you how to develop HTML-based applications with WebObjects.
WebObjects Java Client Programming Guide explains how to develop Swing-based applications with WebObjects.
For additional WebObjects documentation and links to other resources, visit http://developer.apple.com/webobjects.
Additional Resources
In addition to WebObjects development experience, you also need to be acquainted with the Java binary serialization API and XML.
The following resources provide information on serialization and XML:
"Advanced Object Serialization" (http://developer.java.sun.com/developer/technicalArticles/ALT/index.html)
Java and XML (published by O'Reilly)
XSLT (published by O'Reilly)
XSLT Programmer's Reference (published by Wrox Press Ltd.)
Other related resources:
JAXP Tutorial (https://jaxp.dev.java.net/)
http://xml.apache.org contains information on the Apache Xerces XML parser and the Apache Xalan XSLT processor.
XSL Transformations (XSLT) Version 1.0 (http://www.w3.org/TR/xslt)
Working With XML (http://java.sun.com/xml/tutorial_intro.html)
XML From the Inside Out (http://xml.com) is a great resource of XML-related information.
XML Schema (http://www.w3.org/XML/Schema)
Mulberry Technologies, Inc. (http://www.mulberrytech.com)
Security in Java 2 SDK 1.2 (http://java.sun.com/docs/books/tutorial/index.html)
Copyright © 2002, 2005 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2005-08-11