Document Object Model For Tcl

Project Home
Open this chapter TclXML
 TclDOM You are here
  Go to this section Download and Installation
  Go to this section Examples
  Go to this section Documentation
  Go to this section Contributing
  Go to this section Discussion
Open this chapter TclXSLT
Open this chapter Combo Distribution
Open this chapter tkxmllint
Open this chapter tkxsltproc
Open this chapter TclTidy
Open this chapter Xmlgen
Open this chapter Success Stories

TclDOM is a Tcl language binding for the W3C's DOM standard. DOM provides a tree view of an XML document. As of version 3.2, the TclDOM package is included in the TclXML distribution.

Download and Installation

For version v3.2 of TclDOM, just install the TclXML package.


The TclXML package distribution includes a number of useful example scripts. These are as follows:

  • tkxmllint.tcl

    This application provides a graphical interface for the xmllint command-line tool that is part of Gnome libxml2 library.

  • cgi2dom.tcl

    The cgi2dom package turns a HTTP query string into a DOM tree.

  • domtext.tcl

    The domtext package provides a Tk megawidget. It makes the Text widget DOM-aware. Instead of inserting characters into a Text widget, a domtext widget is associated with a DOM tree. The widget displays a text representation of the DOM document.

    A domtext widget responds to certain DOM events that occur on its associated DOM tree. The widget also posts DOM events. A domtext widget allows character data to be edited, and updates the corresponding DOM text node with the new character data.

  • domtree.tcl

    The domtree package provides a BWidget megawidget. It makes the BWidget Tree widget DOM-aware. A domtree widget may be configured to display a DOM tree, which is represented as a tree of nodes.

    A domtree widget responds to certain DOM events that occur on its associated DOM tree. The widget also posts DOM events.


The more the merrier...


Contributions of any kind to the project are welcome.

Reporting Bugs

An important contribution you can make is to test the package and report any bugs. Use SourceForge bug tracking to report problems or request features. Please make sure you set the category to "TclDOM".


We are very grateful to Invisible Worlds, who sponsored the TclXML project for most of 2000. Their contribution resulted in the development of XPath support, the xmlswitch command and other features.


Discussion takes place on the TclXML mailing lists and on comp.lang.tcl.