# CDF Viewer

## What is it?

CDF Viewer is an applet that demonstrates the parsing capability of IBM XML for Java. It is also an excellent example of using ElementFactory to customize object trees for a particular application.

This applet requires Java 1.1. You need either Netscape Communicator 4.03/4.04 with Java 1.1 patch, or Microsoft Internet Explorer 4.0.

There is almost nothing to say about how to use it. You can click on icons to expand the tree, click it again collapses the expanded tree, and click the title to bring the page in the other frame of your browser.

If you want to create your own channel, refer to the following section.

## How to make your own channel

Since the distributed jar package (`xml4j.jar`) contains the other applications (i.e., CDF Editor and SiteOutliner), you may want to create a separate jar file that contains only the necessary files. Here is how to do it.

1. Extract the files from the original jar file and create a new one.

   > `% jar xvf xml4j.jar
   > % jar cvf cdfview.jar com/ibm/xml/parser com/ibm/xml/cdfview org/w3c/dom`

2. Copy `cdfview.jar`, `cdfv-open.gif` and `cdfv-close.gif` to your directory on WWW server
3. Create html pages.
   - You need to create both an applet frame(`applet.html`) and a frame named `content'

         <html>
         <head>
          <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
          <title>CDF viewer</title>
         </head>

         <frameset rows="30%,70%">
           <frame src="applet.html">
           <frame src="default.html" name="content">
           <noframes>
             No Frame?
           </noframes>
         </frameset>
         </html>

   - Make `applet.html` with a parameter "CDFURL"

         <applet code="com.ibm.xml.cdfview.Main"
         	archive="cdfview.jar"
         	width="100%"
         	height="100%">
           <param name="CDFURL" value="mypages.cdf">
         </applet>

Go to README

Last modified: Fri Feb 06 16:22:14 JST 1998