From: Lars H. <Lar...@re...> - 2010-06-17 16:32:20
|
Lately, a lot of the projects I've been working on have involved (i) generating Tcl data structures that could be viewed as a particular encoding of part of an XML document and (ii) converting said data structures to XML on output. While (i) is always rather specific, the (ii) part tends to be very generic, and while it's code-wise very short, it kind of worries me that I'm copying the same procedures from project to project, so I've been thinking "maybe this should go into tcllib?" As a matter of fact, I've been somewhat surprised to not already find something along these lines in there, but maybe it's too elementary to make a package for... The intent is not to provide industrial capacity XML handling (there are well-known compiled extensions for that), but rather to provide a cheap package that you can put into your script when you just want to add XML as another output format. The latest version of my command is TDLtoXML::xml_from_trees (but never mind the namespace) on http://wiki.tcl.tk/25681#pagetocbc2b8a8c. This coverts from a tdom list format to XML (cf. http://wiki.tcl.tk/26156), and that is perhaps something that should be scrutinised, since putting something like this in tcllib is an act of blessing its data format. Comments, anyone? Lars Hellström |