XML Support for Tcl

Steve BallZveno Pty Ltd

Abstract

XML is emerging as a significant technology for use on both the World Wide Web and in many
other application areas, such as network protocols. Documents written in XML have a rich,
hierarchical structure, the document tree.
An application which is to process XML documents must be able to access and manipulate
the document tree in order to be able to examine and change the structure.

The DOM is a language-independent specification of how an application accesses and manipulates
the document structure. TclDOM is a Tcl language binding for the DOM. The TclDOM specification
provides a standard API for Tcl applications to process a XML or HTML document.

TclXML is a Tcl package which provides a sample implementation of TclDOM. It provides XML
parsers along with the tools needed to create a hierarchical representation of documents
which can be conveniently processed by a Tcl script. There are also facilities to check the
validity of a document, along with commands to produce document output. TclXML provides a
framework for parser and validator modules which allows some or all of the various components to
be implemented in an extension language.