Actually I have one list of channels names like:
Rai 1
Rai 1 +1HD
Rai 1 +2HD
Rai 2
Rai 2 +1HD
Rai 2 +2HD
.
.
.
.
From this list of names I need create one new xml file with this structure
<channel id="Rai 1">
<display-name lang="it">Rai 1</display-name>
<icon src="http://www.my-website.com/logos/Rai_1.png" />
</channel>
<channel id="Rai 1 +1HD">
<display-name lang="it">Rai 1 +1HD</display-name>
<icon src="http://www.my-website.com/logos/Rai_1_+1HD.png" />
</channel>
<channel id="Rai 1 +2HD">
<display-name lang="it">Rai 1 +2HD</display-name>
<icon src="http://www.my-website.com/logos/Rai_1_+2HD.png" />
</channel>
<channel id="Rai 2">
<display-name lang="it">Rai 2</display-name>
<icon src="http://www.my-website.com/logos/Rai_2.png"/>
</channel>
<channel id="Rai 2 +1HD">
<display-name lang="it">Rai 2 +1HD</display-name>
<icon src="http://www.my-website.com/logos/Rai_2_+1HD.png"/>
</channel>
<channel id="Rai 2 +2HD">
<display-name lang="it">Rai 2 +2HD</display-name>
<icon src="http://www.my-website.com/logos/Rai_2_+2HD.png"/>
</channel>
.
.
.
.
Is important the link http have one name without blank space.
I am trying to do it with xmlstarlet, but I am totally beginner about scripting and I can't find a solution.