XML Software Guide: XML APIs
July 5th 1998
Last Modified:
March 2, 2009
A number of application programming interfaces exist to make dealing
with common XML tasks such as parsing easier. Most are written in
Java, although Python and perl APIs are also quite popular.
-
- SAX
- The Simple API for XML; an extremely popular
event-based interface
for any XML parser, which differs dramatically from the
mempory-intensive, tree-based
DOM approach to parsing. SAX is somewhat of a grass-roots effort,
spearheaded by David Megginson,
developed collaboratively by the members of the
XML-DEV mailing list.
As you can tell from the rest of this page, SAX is the basis for
quite a few Java APIs.
The May 1998 version of SAX, now called
SAX1,
is supported by nearly every XML parser.
The current version, SAX2,
released in May 2000,
is supported by many but not all major parsers.
Megginson sees SAX addressing a need much like JDBC fills
for SQL. The idea behind SAX is to provide an interface by which
any Java application can access any XML parser, provided the
parser has a SAX driver. Virtually every major XML parser either
supports the SAX1 and/or SAX2 interface directly or indirectly via third-party
drivers. SAX comes with sample drivers (e.g., Lark and MSXML).
[freeware for all Java platforms]
- JAXP: Java API for XML Parsing
-
[For potentially more current information about Sun's XML efforts,
see the Java Technology and XML page.]
Sun's JAXP, the Java API for XML Parsing, originally released in
April 2000, provides a standard (but optional)
interface to XML for Java applications. It does not require use of Sun's
Java Project X parser (below), although this is the default.
Download the JAXP code and specification.
According to the JAXP README,
"The Java API for XML Parsing (JAXP) Optional Package enables basic functionality for reading,
manipulating, and generating XML documents through pure Java APIs. The API provides a
standard way for any XML-conformant parser to be accessed by an application. The reference
implementation uses the high performance Java Project X as its default XML parser. However,
the software's pluggable architecture allows any XML conformant parser to be used.
This release is addressed to Java developers who want access to Sun's fast and
fully-conformant XML software for development. The library includes fast XML parsers (both
validating and non-validating) and supports an optional in-memory object model tree for
manipulating and writing XML structured data. Using this software, application and tool
developers can build fully-functional XML-enabled Java applications for e-commerce, application
integration, and web publishing. This release offers 100% conformance to the XML 1.0
Specification, SAX 1.0, DOM Level 1 Core, and XML namespaces."
[freeware for all Java platforms]
-
Java Project X
- [For potentially more current information about Sun's XML efforts,
see the Java Technology and XML page.]
JavaSoft renamed its former XML Library to Java Project X.
Early Access release 2 became available Dec. 1, 1998. Technology Release 1
became available in late February 1999 with
Technology Release 2 following in May 1999.
Java Project X provides "full XML processing
capabilities, including a fast XML parser with optional validation, an in-memory object model tree
that supports the W3C DOM Level 1 recommendation, and basic support for JavaBeans
integration with XML."
See the FAQ and our
WDVL entry with a code example.
In a Q and A interview, Dave Brownell said:
"Java Project X is the codename for a set of core XML-enabling services, using
JavaTM technology."
Note that JavaSoft has submitted a proposal for a
Java Standard Extension for XML.
[freeware for all Java platforms]
-
DOM Level 1: Java XML API definitions
- Java XML API definitions are part of the W3C effort to define
the
Document Object Model (DOM), Level 1.
The DOM defines "a platform- and language-neutral interface
that will allow programs and scripts to dynamically access and
update the content, structure and style of documents. The
Document Object Model
provides a standard set of objects for representing
HTML and XML documents, a standard model of how these objects can
be combined, and a standard interface for accessing and manipulating
them."
Note: DOM Level 2
is a W3C Candidate Recommendation as of May 2000. DOM2 has its own
Java Language Binding page.
[freeware for all Java platforms]
-
SAXON
- "The SAXON package is a collection of tools for processing XML documents.
The main components are:
- An XSLT processor, which implements the Version 1.0 XSLT and XPath Recommendations....
with a number of powerful extensions
- A Java library, which supports a similar processing model to XSL, but allows full programming
capability, which you need if you want to perform complex processing of the data or to access
external services such as a relational database
- A slightly improved version of the Ælfred parser from Microstar. (But you can use SAXON with any
SAX-compliant XML parser if you prefer).
So you can use SAXON by writing XSL stylesheets, by writing Java applications, or by any combination of
the two. If you are only interested in running the XSLT interpreter, on a Windows platform, try
Instant SAXON".
SAXON also includes a useful example application called
DTD Generator
that creates a DTD from an XML instance.
[freeware for all Java platforms]
- Coins
- "Tightly Coupled JavaBeans and XML Elements".
Bill la Forge of
JXML
is the major person behind Coins, although he receives
considerable input from the
java-xml-interest emailing list.
A Coin consists of two "faces": an XML element is the
persistent form, and the JavaBean instance is the runtime form. Coins
is an alternative to
Java Serialization
in which each JavaBean property is exposed as an XML element
attributes.
[freeware for all Java platforms]
- Quick
- A more recent JXML effort (February 2000) is
Quick,
an API for converting XML files into a structure of objects, using the classes of your choice.
Quick uses a schema language,
QJML,
to define markup languages and their relationship to Java classes.
Quick replaces the former JXML effort called
MDSAX (Multi-Document Simple API for XML).
[freeware for all Java platforms]
-
Docuverse DOM SDK
-
(Previously known as FREE-DOM and SAXDOM.)
Don Park's DOM SDK is layered on top of SAX; provides a
DOM (Document Object Model)
interface in Java.
Can be used with
Swing
to support custom node implementations. Extensive javadoc documentation.
Supports both XML and HTML DOMs.
Third party software with which DOM SDK is compatible:
SAX1, JAXP 1.0,
COINS,
DOM Parser,
Koala XSL Engine,
and many others.
[free product from Docuverse for all Java platforms]
- 4Suite: 4DOM, 4XPath, 4XSLT
-
4Suite is FourThought's proven, standards-based suite of
Python software
for Web application development.
4Suite consists of five major components, all of which are
open-source (although two are not yet publicly available).
The three available components are:
- 4DOM
is an implementation of the W3C's standard DOM API for HTML and XML content
manipulation. 4DOM has full distributed-object support based on the IDL used in the formal DOM spec.
- 4XSLT
is a powerful XSLT processor based on the latest draft of the W3C's XSLT specification. One of
its many uses is to render XML documents as customized and stylized HTML for current Web browsers.
4XSLT also provides a powerful programming API for applications to use for low-level, customized
transformations of XML documents.
- 4XPath
is a library implementating of the W3C's XPath language for indicating and selecting portions of
an XML document.
[freeware for all Python platforms]
- DDML/XSchema
- According to author/developer Simon St.Laurent,
"The XSchema project
[now called DDML: Document Definition Markup Language]
is a cooperative effort, based on the
xml-dev
mailing list. The XSchema specification, when complete, will
provide a means for XML developers to describe their XML document
structures using XML document syntax." The main
goal
of XSchema is to eliminate the need for XML language creators to use
a DTD to define their new language; they would use XML syntax
instead. The
advantages of XSchema are many.
Note:Since XSchema first appeared, a W3C Note,
Document Content Description (DCD) for XML
appeared from IBM, Microsoft, and Textuality to provide an RDF
vocabulary that expresses data (i.e., a subset of the XML-Data
proposal) and datatypes without a DTD.
[freeware for all Java platforms]
- LT XML
- According to LTG,
"LT XML is an integrated set of XML tools and a
developers' tool-kit, including a C-based API. The
release now available will run on UNIX and
WIN32.
The LT XML tool-kit includes stand-alone tools for a
wide range of processing of well-formed XML
documents, including searching and extracting,
down-translation (e.g. report generation,
formatting), tokenising and sorting.
Sequences of tool applications can be pipelined
together to achieve complex results.
For special purposes beyond what the
pre-constructed tools can achieve, extending their
functionality and/or creating new tools is easy using
the LT XML API. Minimal applications require less
than one-half page of C code to express.
LT XML provides two views of an XML file; one as a
flat stream of markup elements and text; a second as
a sequence of tree-structured XML elements. The
two views can be mixed, allowing great flexibility in
the manipulation of XML documents. It also
includes a powerful, yet simple, querying language,
which allows the user to quickly and easily select
those parts of an XML edocument which are of
interest."
[C language freeware for UNIX and WIN32 platforms]
- IBM's XML Productivity Kit for Java
- [Note: This technology has been retired.]
XPK4J is another IBM alphaWorks technology.
"XML Productivity Kit is a companion technology to the XML Parser for Java which provides the next
level of programming resources needed to quickly build and deploy robust XML applications using
the Java language....Both DOM and SAX have been encapsulated in a set of basic JavaBeans that can be used to build
other XML JavaBeans and interconnect between these two standards. The important XPK4J
JavaBeans in the set are DOM and SAX filter classes suitable for extending for specific needs."
[freeware for all Java platforms]
- XAF: XML Architectural Forms
- [This effort orginally by David Megginson has been taken over
by JXML as part of MDSAX.] "The Java XAF package allows you to process
architectural forms with any Java-based,
SAX-conformant XML parser. The core of the package is
a SAX driver, com.megginson.xml.xaf.SAXDriver, which
sits between a regular SAX parser and the client's
document handler, translating the SAX events according
for the specified base architecture.
XAF lets an XML document masquerade as many
different documents, by associating the document with
one or more base architectures. For example, by
specifying the right architectural forms, you can embed
RDF or MathML in an XML document without actually
using the RDF or MathML element type names."
[freeware for all Java platforms]
- XML Testbed
-
Steve Withall's XML Testbed provides "its own supporting XML
infrastructure, including an XML parser and grove.
A key feature of the infrastructure is a 'node type
registry', which allows dynamic control over which
classes are used for particular types of elements - the
element class to represent them, the parser class to
parse them, the customizer class to edit them and the
view class to display them (using a Swing text editor
kit). The XML Testbed provides means to edit and then
parse an XML source....
The software has been designed to be as modular as possible, to be
divided into a suite of relatively small packages, each with a clear role....
[XML testbed includes a] nascent XSL engine, XML-based user interface
configuration, and a database analyser for
generating an XML file of the schema of a database."
The overall structure
includes a diagram that shows the relationship among the many packages.
This software does not presently support
DOM compliance.
[freeware for all Java platforms]
XML Software Guide: Database and Content Management
XML Software Guide
XML Software Guide: Specialized XML Software
|