This is a product of the Apache XML project available as a shared library and implemented in KCML using dynamic objects. It allows an XML Document Object Model or DOM tree to be created in the memory of a KCML program with nodes corresponding to the tags, text, attributes, comments etc from the XML document. The DOM model is a W3C standardized object model used to programmatically manipulate XML. Xerces implements DOM level 2 as well as SAX2 and partially implements Schema. There is also initial support for DOM3 features such as serialization
The DOM parser is ideal for applications that need to load a document in memory and manipulate or access its components randomly.
The SAX2 parser interface is more suitable for applications that wish to stream large documents without building an in-memory DOM tree. This is faster and uses significantly less memory than the DOM approach but once a tag has been parsed it is lost unless the application preserves the information.
An Apache DOM object is created with CREATE using the dyndom shared library e.g.
OBJECT x = CREATE "dynamic", "dyndom"
Documentation for the objects created may be found at the Xerces web site here and their implementation in KCML is documented here. Note that KCML does not implement all the features of the Xerces model at this time.
There are some examples of using the DOM and SAX in this manual
Xerces is not reentrant and it is not safe to have more than one copy initialized at the same time in the same KCML session. The Xerces library is also loaded by the Xalan XSLT object which also should not co-exist with a simple Xerces object. However Xalan exposes indentical functionality and can act as a superset object.
The libxml2 library has a very similar interface, is faster and has a much smaller memory footprint. It also supports XPath.
This product includes software developed by the Apache Software Foundation (http://www.apache.org/).