I tend to use code-generation to avoid "dumb" work where possible. Xslt is a valueable tool to create the templates for the code that is to be generated. The available functions in Xpath have been limited in number; with the advent of C# the following becomes possible:
<BLOCKQUOTE dir=ltr style=”MARGIN-RIGHT: 0px”><PRE>
<stylesheet version=”1.0” xmlns=”http://www.w3.org/1999/XSL/Transform“
Although it'll probably be some time before we can use this within an application as client-side script, it sure does make the Xsl/Xpath-combination a more powerful solution for generating code.