A light weight implementation of the DOM in ANSI C