Removing all values from an XML Document



Is there an easy way in SQL Server to take an XML Document and remove all
its values while leaving the structure, elements and attributes in place?

I have included a sample of what I would like below

For example take:

'<root>

<foo name="Joe"/>

<heading name="One">

<contents>some text</contents>

</heading>

</root>'

and return:

'<root>

<foo name=""/>

<heading name="">

<contents></contents>

</heading>

</root>'




.