I am getting an xml file like this.

<chair> nilkamal </chair>
<fan> kaithan </fan>
<TV> Samsun TV </TV>
<cooler> L G </cooler>

I have to get the output with out trailing spaces in the XMl elements. No schema restrictions has to be applied on this xml file only either with XSLT/Xquery or any other which suits to this..

<TV>Samsun TV</TV>
<cooler>L G</cooler>