Marco asked at ASP.NET Forums how to process existing XML compliant HTML document recursively such that you would add certain attribute(s) to certain type of element node(s). This is what I came up with and it seems to work pretty fine. <? xml version