Java Reference
In-Depth Information
Dozens of Java packages are offered by other companies, groups, and individuals under a
variety of commercial and open source licenses. Some of the most notable come from
Apache Jakarta, a Java development project of the Apache Software Foundation that has
produced the web application framework Struts, the Log4J logging class library, and
many other popular libraries.
Another terrific open source Java class library is the XOM library, a tree-based package
for XML processing that strives to be simple to learn, simple to use, and uncompromis-
ing in its adherence to well-formed XML.
The library was developed by the programmer and author Elliotte Rusty Harold based on
his experience with Sun's XML processing packages and other efforts to handle XML in
Java.
The project was originally envisioned as a fork of JDOM, a popular tree-based model for
representing an XML document. Harold has contributed code to that open source project
and participated in its development.
Instead of forking the JDOM code, Harold decided to start from scratch and adopt some
of its core design principles in XOM.
The library embodies the following principles:
XML documents are modeled as a tree with Java classes representing nodes on the
tree such as elements, comments, processing instructions, and document type defi-
nitions. A programmer can add and remove nodes to manipulate the document in
memory, a simple approach that can be implemented gracefully in Java.
n
All XML data produced by XOM is well-formed and has a well-formed name-
space.
19
n
Each element of an XML document is represented as a class with constructor
methods.
n
Object serialization is not supported. Instead, programmers are encouraged to use
XML as the format for serialized data, enabling it to be readily exchanged with any
software that reads XML regardless of the programming language in which it was
developed.
n
The library relies on another XML parser to read XML documents and fill trees
instead of doing this low-level work directly. XOM uses a SAX parser that must be
downloaded and installed separately. Right now, the preferred parser is Apache
Xerces 2.7.1.
n
Search WWH ::




Custom Search