[From the IBM XML for Java README, IBM alphaWorks: http://www.alphaworks.ibm.com/formula/xml, February 02, 1998. See the canonical sources]
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:
unzip
command.
xml4j-199xxxxx.zip
into
a directory.
You will see the following files in theC:\>unzip some_directory\xml4j-199xxxxx.zip C:\>cd xml4j C:\xml4j>
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
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.
.tar.gz
format.
(If you have installed the unzip
command for UNIX, ZIP format is also Ok.)
You will see the following files in the# cd /usr/local # gzip -dc some_directory/xml4j-199xxxxx.tar.gz | tar xvf - # cd xml4j
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
# 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.
Some sample applications are provided:
trlx is an XML syntax checker. To check an XML document, type:
jre -cp "xml4j" trlx <xml-filename>
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 is a Java application to edit CDF files. The user loads a CDF file and edits the channels and items.
CDF Viewer is an applet that parses CDF files and visualizes their structures by using a tree.
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.
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:
<?xml encoding="...."
'
Document, Element, Attribute, Text, Comment, PI,
Node, NodeList, EditableNodeList, NodeEnumerator, AttributeList, Notation,
CDATASection
(there are limitations in some interfaces)
DocumentContext, DOM, DOMFactory,
DocumentType, ElementDefinition, ModelGroup, AttributeDefinition,
ConditionalSection
W3C DOM interfaces belong to a package named
`org.w3c.dom
'.
com.ibm.xml.parser.SAXDriver
provides the SAX interface.
Parser#setProcessNamespace(true)
when you need the namespace feature.
𐀀
- 
.