The most common library tool to manipulate XML in Tcl is tDOM, but you might not need all that.
Something I have found quite convenient sometimes is to get my data from the db by a db_multirow, then format it in the adp as xml taking advantage of the "multiple", "if" and other special tags.
Hope this helps