Forum OpenACS Q&A: Re: Integrating OpenACS/Project* with GanttProject

Posted by Andrew Grumet on

The oacs-dav package uses it too, see tDAV-procs.tcl. Main lesson is, tdom is your friend. The tdom docs are here:

Here are a couple of my most-used tdom utility functions (probably belong in the toolkit somewhere if alternatives aren't readily available):

ad_proc -public ps_simpleTextElement {doc name value} {} {
    set element_node [$doc createElement $name]
    set value_node [$doc createTextNode $value]
    $element_node appendChild $value_node
    return $element_node

ad_proc -public ps_rfc822date seconds {} {
    return [ns_fmttime $seconds "%a, %d %b %Y %T %Z"]