~ubuntu-branches/ubuntu/quantal/xom/quantal

« back to all changes in this revision

Viewing changes to README.txt

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2007-11-25 15:50:40 UTC
  • Revision ID: james.westby@ubuntu.com-20071125155040-r75ikcqf1vu0cei7
Tags: upstream-1.1
ImportĀ upstreamĀ versionĀ 1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
XOM is a library. By itself, it doesn't do much of anything. It exists
 
2
only to be used by other programs. It requires Java 1.2 or later. 
 
3
 
 
4
To install it you'll need to place the XOM JAR archive somewhere in your
 
5
CLASSPATH. This archive is the file named something like xom-1.1.jar. 
 
6
(The version number may have changed if I've forgotten
 
7
to update this document.) You can either put it in your jre/lib/ext
 
8
directory, add xom-1.1.jar to your CLASSPATH environment variable, or
 
9
use the -classpath option when invoking javac and java.
 
10
 
 
11
To check your download you can run one of the sample programs found in
 
12
the xom-samples.jar file. For instance, nu.xom.samples.PrettyPrinter
 
13
class formats an XML document by inserting and removing white space
 
14
around element boundaries. In Java 1.4 and later you can run it from the
 
15
command line like this:
 
16
 
 
17
$ java -classpath xom-samples.jar:xom-1.0.jar nu.xom.samples.PrettyPrinter filename.xml
 
18
 
 
19
Java 1.3 and earlier do not have a built-in XML parser so in these environments you'll also need to install XOM's supporting libraries. These include xalan.jar, xercesImpl.jar, and xmlParserAPIs.jar, and are found in the lib directory. The versions shipped with XOM are quite a bit faster and less buggy than the ones bundled with the JDK, so you may well want to use them even in Java 1.4 and later. For example,
 
20
 
 
21
$ java -classpath xom-samples.jar:xom-1.1.jar:lib/xmlParserAPIs.jar:lib/xercesImpl.jar:lib/xalan.jar nu.xom.samples.PrettyPrinter filename.xml
 
22
 
 
23
You could leave out xalan.jar if you don't use any of the classes in
 
24
nu.xom.xslt. junit.jar is only used for testing, and is
 
25
not needed for normal operation of XOM.
 
26
 
 
27
If you want to build XOM from source, you'll need to have Apache Ant
 
28
installed. See http://ant.apache.org/. Once Ant is installed, building
 
29
should be as simple as typing "ant compile" or "ant jar" in the xom
 
30
directory. Type "ant help" to see other possible options. Most of the
 
31
targets build in Ant 1.5 or later. However the betterdocs target
 
32
requires Ant 1.6, and the test target only works in Ant 1.5. It does not
 
33
work in Ant 1.6, though the testui target does.
 
34
 
 
35
=======================================================================
 
36
XOM is Copyright 2004, 2005 Elliotte Rusty Harold
 
37
   
 
38
   This library is free software; you can redistribute it and/or modify
 
39
   it under the terms of version 2.1 of the GNU Lesser General Public 
 
40
   License as published by the Free Software Foundation.
 
41
   
 
42
   This library is distributed in the hope that it will be useful,
 
43
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
44
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 
45
   GNU Lesser General Public License for more details.
 
46
   
 
47
   You should have received a copy of the GNU Lesser General Public
 
48
   License along with this library; if not, write to the 
 
49
   Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
 
50
   Boston, MA 02111-1307  USA
 
51
   
 
52
You can contact Elliotte Rusty Harold by sending e-mail to
 
53
elharo@metalab.unc.edu. Please include the word "XOM" in the
 
54
subject line. For more information see http://www.xom.nu/ 
 
55
or ask a question on the xom-interest mailing list.