CDF Viewer is an applet that demonstrates the parsing capability of IBM's XML Parser 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.
Since the distributed jar package (xml4j_n_n_n.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.
% jar xvf xml4j_n_n_n.jar
% jar cvf cdfview.jar com/ibm/xml/parser samples/CdfView/CdfView org/w3c/dom
cdfview.jar
, cdfv-open.gif
and cdfv-close.gif
to your directory
on WWW server
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>
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>