[From the IBM XML for Java README, IBM alphaWorks: http://www.alphaworks.ibm.com/formula/xml, February 02, 1998. See the canonical sources]

IBM XML for Java - README

VERSION: alpha-3 Feb-1998


XML for Java is an Extensible Markup Language (XML) processor written in Java. XML for Java provides two main functions:


Installation

Windows95, WindowsNT
  1. Install JDK-1.1 and unzip command.
  2. Download a distribution package in ZIP format.
  3. Unzip the distribution package, xml4j-199xxxxx.zip into a directory.
    C:\>unzip some_directory\xml4j-199xxxxx.zip
    C:\>cd xml4j
    C:\xml4j>
    	    
    You will see the following files in the xml4j directory:
    README.html    -- this file
    api/           -- directory for API documents
    docs/          -- directory for documents
    license.html   -- license information
    personal.dtd   -- sample DTD file
    personal.xml   -- sample XML document
    src/           -- directory for sample source code
    xml4j.jar      -- class files
    
  4. Try the following command to test your installation. This test parses the input and then regenerates the same XML document.
    C:\xml4j>type personal.xml
    C:\xml4J>java -classpath "C:\jdk1.1.5\lib\classes.zip;xml4j.jar" trlx -d personal.xml
    

    where C:\jdk1.1.5\ is the location of your JDK 1.1 installation.

UNIX
  1. Install JDK-1.1 and GNU gzip.
  2. Download a distribution package in .tar.gz format. (If you have installed the unzip command for UNIX, ZIP format is also Ok.)
  3. Extract the distribution package into a directory.
    # cd /usr/local
    # gzip -dc some_directory/xml4j-199xxxxx.tar.gz | tar xvf -
    # cd xml4j
    	    
    You will see the following files in the xml4j directory:
    README.html    -- this file
    api/           -- directory for API documents
    docs/          -- directory for documents
    license.html   -- license information
    personal.dtd   -- sample DTD file
    personal.xml   -- sample XML document
    src/           -- directory for sample source code
    xml4j.jar      -- class files
    	    
  4. Try the following command to test your installation. This program parses the input and then regenerates the same XML document.
    # cat personal.xml
    # java -classpath "/usr/local/java/lib/classes.zip:xml4j.jar" trlx -d personal.xml
    	    

    where /usr/local/java/ is the location of your JDK 1.1 installation.


Sample Applications

Some sample applications are provided:

trlx (Java application):

trlx is an XML syntax checker. To check an XML document, type:

jre -cp "xml4j" trlx <xml-filename>
SiteOutliner (Java application):

SiteOutliner is a Java application that scans a Web site and reports its profile in CDF format. The profile contains a list of links to the pages, showing the structure of the site. The user can limit the files to be scanned by using some conditions, such as file types (extensions) and modified dates. The program can be used in both command prompt and window environments.

CDF Editor (Java application):

CDF Editor is a Java application to edit CDF files. The user loads a CDF file and edits the channels and items.

CDF Viewer (Java applet):

CDF Viewer is an applet that parses CDF files and visualizes their structures by using a tree.

Validating Generation sample (Java application):

This sample generates a valid element tree according to the specified DTD.

jre -cp "xml4j.jar" GeneratingSample personal.dtd

All the classes required to run these sample applications are in xml4j.jar.


Program Development

This distribution archive includes a file named xml4j.jar. Add this file to your CLASSPATH environment variable, writing a command such as

set CLASSPATH=C:\xml4j\xml4j.jar;. (for Windows)
(assuming that you have installed XML for Java in C:\xml4j.)
setenv CLASSPATH /usr/local/xml4j/xml4j.jar:. (for UNIX, csh/tcsh)
export CLASSPATH="/usr/local/xml4j/xml4j.jar:." (for UNIX, ksh/bash/zsh)

The following resources are provided for application development:


RELEASE NOTE

This version of the processor is based on XML 1.0 Proposed Recomendation [08-Dec-1997]
The processor supports 18 encodings for `<?xml encoding="...."'
ISO-10646-UCS-4, ISO-10646-UCS-2, UTF-8, US-ASCII, ISO-8839-1 ... ISO-8859-9, ISO-2022-JP, Shift_JIS, EUC-JP, GB2312, Big5
Validating Generation
Applications can recognize information in the Document Type Definition (DTD) and generate a document that has correct structure. See `How to query DTD information' in the programming guide.
W3C Document Object Model (DOM) [09-Dec-1997] Support:
Supported Interfaces:
Document, Element, Attribute, Text, Comment, PI, Node, NodeList, EditableNodeList, NodeEnumerator, AttributeList, Notation, CDATASection (there are limitations in some interfaces)
Unsupported Interfaces:
DocumentContext, DOM, DOMFactory, DocumentType, ElementDefinition, ModelGroup, AttributeDefinition, ConditionalSection

W3C DOM interfaces belong to a package named `org.w3c.dom'.

SAX (Simple API for XML) [12-Jan-1998] support
com.ibm.xml.parser.SAXDriver provides the SAX interface.
Namespace
The processor can't handle characters in &#x010000; - &#x10FFFF;.

CHANGES

Feb.1998
First public release.

TO DO


[ IBM | alphaWorks | alphaWorks communityXchange ]
Last modified: Fri Feb 06 17:38:09 JST 1998