sed 's/^\(\h*\)\(.*\)$/\1<!-- \2 -->/' web.xml
I think that this should take this xml:
<a>
<d>
bla
</d>
</a>
And turn it into:
<!-- <a> -->
<!-- <d> -->
<!-- bla -->
<!-- </d> -->
<!-- </a> -->
But what is doing is this:
<!-- <a> -->
<!-- <d> -->
<!-- bla -->
<!-- </d> -->
<!-- </a> -->