DOMC

The Document Object Model (DOM) in c

Download

DOMC is a light weight implementation of the DOM in ANSI c as specified in the W3C Document Object Model Level 1, Level 2, and Level 2 Events recommendations.

The DOM is the W3C recommended way to manipulate XML and HTML documements as a tree of nodes. It is the more sophisticated but more memory constraining alternative to the SAX api. In the spirit of Expat and the community process I encourage users to contribute improvements and bug fixes although as cited in the the MIT License you are not obligated to do so. The codebase is small and should be quite portable however it was developed in the GNU/Linux environment. The Expat XML parser is included in the distribution and will enable DOMC to load and store documents however it is not required (you can easily supplement your own serialization functions).

Relevant Technical
Documentation

DOM Level 1
DOM Level 2
DOM Level 2 Events

API Documentation

API Reference
Browse The Source

News

domc-0.5.7 released
Sun Nov 4, 2001

Several users have asked for the ability to load and store XML documents from a file descriptor. The DOM_Document_fread and DOM_Document_fwrite methods will do just that. There have been numberous other small changes and build improvements this time. Sorry, no zip this time.

New API Reference
Sun Nov 4, 2001

The HTML API Reference has been greatly improved. It contains little to no functional description (you should look at the W3C documentation for that) but the prototypes are organized and visually easier than just looking at the header file.

domc-0.5.1 released
Sat Oct 27, 2001

The DOM_DocumentLS_save function for writing a DOM tree to an XML file was improperly writing newlines and indenting elements. This behavior has been corrected. Expat 1.2.0 is now also include in the zip archive along with a Makefile to build it with one of the domc examples using cl on the Windows platform (not much of a test but it builds and runs fine).

domc-0.5.0 released
Tue Aug 28, 2001

The Document Object Model Level 2 Events recommendation has been implemented. There are no mutation events but the UIEvents structure is in place and it is my intention to add a KeyEvent module. The Makefile provided in the UNIX archive will also now build DOMC as a shared library (for Linux but it's a good start for other platforms). The Expat XML parser is included with a similar Makefile to built it too as a shared library.

domc-0.4.0 released
Sat Jul 28, 2001

There have been only minor bug fixes since 0.3 but the build process has been improved greatly.