CTE and Hierarchical XML Result
I've found a trick to solve the problem of creating a hierarchical XML from a CTE query (exposed in this blog entry).
Since it's quite long i've posted it in this article:
CTE and Hierarchical XML Result
Have a nice read!